cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

How to change the density of many parts in an assembly at once?

SOLVED
Highlighted
Participant

How to change the density of many parts in an assembly at once?

I have an assembly with almost 500 parts in it.  Is there a way to change all the densities at once?  More ideally, I would like to be able to select large groups and change, say ~300 parts to one density, then select another large group (steel), say ~200 parts to change to a different density (aluminum).  I do not want to have to change the density part by part in the model tree showing MP_Density.  I would prefer solution where I can select the large groups, then change all their densities together in a few steps.  

 

Thanks,

Will

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted

Re: How to change the density of many parts in an assembly at once?

Thanks to @Tdaugherty  here's the solution I used:

 

1. Select up to 125 parts to change (note, you cannot select a tree group, need to select individual parts - I also had some inconsistencies in changes when selecting items in different groups/sub-groups; also can select sub-assemblies, but the sub-assembly will get a density assigned instead of being blank if you are not careful).  Bottom line, just select items at the same model tree level.

2. Right click on .prt items in tree & choose Parameters.

3. At the bottom of the Parameters window that opens, pull down the menu to change from "Main" to "Alternate mass properties".  (Note, when I selected a tree grouping, this pull down didn't appear, so I couldn't go further, thus avoiding groupings.)

4. Click on Name column to sort by names & find MP_DENSITY

5. Click on a MP_DENSITY to highlight it.

6. Right click & choose "Parameter"

7. Right click again & choose "Select all same name parameters"

8. Right click once more & choose "Edit Properties"

9. Change value

10. Click OK in Parameter Properties window.

11. Click OK in Parameters window.

12. Regenerate.

View solution in original post

8 REPLIES 8
Highlighted

Re: How to change the density of many parts in an assembly at once?

There are many ways to get there... ModelCheck, DBatch, Trail Files, mapkeys, ....

 

BUT -- IF mp_density is all that is required to change - there is a quick and easy way.

 

As an example - to blast every model in your Creo session with that change by simply doing the following using CREOSON via the PlayGround.  (copy and paste the code into the Playground after you get a connection... and boom!)  

 

let paramObj = new creo.ParameterObj();

    paramObj.name = "mp_density"
    paramObj.value = 1.0
    paramObj.file = "*.prt"
    
    paramObj.set();

 
There is so much you can do with CREOSON. You can easily do groups of parts like you were wanting - it is just a matter of how you determine what needs to change... (predefined list - or have the code gather the matching items for each group and then make the changes accordingly).

 

BTW - you can also detect, load and set Materials Files via CREOSON. So if that is the ultimate goal to update models.. it is also pretty easy to do.

 

The above Example was using JavaScript - but there are similar functions in the PYTHON Library (CREOPYSON).

 

Hope that gives you a good option to consider. 

 

Dave

Highlighted

Re: How to change the density of many parts in an assembly at once?

Thank you Dave, but unfortunately, I cannot get that software installed.

Highlighted

Re: How to change the density of many parts in an assembly at once?

Odd - there is nothing to "install" - simply download, unzip and run...

 

BUT you do need to have JLINK installed with Creo.

 

maybe that is the issue?

 

Dave

Highlighted

Re: How to change the density of many parts in an assembly at once?

Changing the material in the part will also change the density value. Here are some quick steps you can use to edit multiple part attributes at a time. 

 

From the assembly...

  1. Select the parts that wish to edit
  2. While they are highlighted, right-click and click "Parameters"
  3. Locate "PTC_MATERIAL_NAME"
  4. Right-click on the parameter
  5. Click "Select Parameter"
  6. Right-click on the selected parameter again
  7. Click "Select all same name parameters"
  8. Click "Properties" - a new dialog will open
  9. Edit the value of PTC_MATERIAL_NAME
  10. Click OK to close

You will likely get a warning if you select too many parts but you can ignore it most of the time.

I've attached a quick video of the above steps as well. Good luck!

 

Ty

Highlighted

Re: How to change the density of many parts in an assembly at once?

Ty,

 

Thank you very much!  Especially for taking the time to make the video.

 

We do not have materials setup yet 😞 but I was able to modify your instructions to work (I'll post them back to the original message).

 

Thanks,
Will

Highlighted

Re: How to change the density of many parts in an assembly at once?

Thanks to @Tdaugherty  here's the solution I used:

 

1. Select up to 125 parts to change (note, you cannot select a tree group, need to select individual parts - I also had some inconsistencies in changes when selecting items in different groups/sub-groups; also can select sub-assemblies, but the sub-assembly will get a density assigned instead of being blank if you are not careful).  Bottom line, just select items at the same model tree level.

2. Right click on .prt items in tree & choose Parameters.

3. At the bottom of the Parameters window that opens, pull down the menu to change from "Main" to "Alternate mass properties".  (Note, when I selected a tree grouping, this pull down didn't appear, so I couldn't go further, thus avoiding groupings.)

4. Click on Name column to sort by names & find MP_DENSITY

5. Click on a MP_DENSITY to highlight it.

6. Right click & choose "Parameter"

7. Right click again & choose "Select all same name parameters"

8. Right click once more & choose "Edit Properties"

9. Change value

10. Click OK in Parameter Properties window.

11. Click OK in Parameters window.

12. Regenerate.

View solution in original post

Highlighted

Re: How to change the density of many parts in an assembly at once?


@Meeple wrote:

Thanks to @Tdaugherty  here's the solution I used:

 

1. Select up to 125 parts to change (note, you cannot select a tree group, need to select individual parts - I also had some inconsistencies in changes when selecting items in different groups/sub-groups; also can select sub-assemblies, but the sub-assembly will get a density assigned instead of being blank if you are not careful).  Bottom line, just select items at the same model tree level.

2. Right click on .prt items in tree & choose Parameters.

3. At the bottom of the Parameters window that opens, pull down the menu to change from "Main" to "Alternate mass properties".  (Note, when I selected a tree grouping, this pull down didn't appear, so I couldn't go further, thus avoiding groupings.)

4. Click on Name column to sort by names & find MP_DENSITY

5. Click on a MP_DENSITY to highlight it.

6. Right click & choose "Parameter"

7. Right click again & choose "Select all same name parameters"

8. Right click once more & choose "Edit Properties"

9. Change value

10. Click OK in Parameter Properties window.

11. Click OK in Parameters window.

12. Regenerate.


Hi,

tip: To select parts, you can use Search Tool (binocular icon at the bottom of Creo window).

select.png

 


Martin Hanák

Re: How to change the density of many parts in an assembly at once?

Thanks for the tip!  It'll help make it easier.

Announcements