How to alter values in a Parts List

How to alter values in a Parts List

JBEDsol
Collaborator Collaborator
376 Views
3 Replies
Message 1 of 4

How to alter values in a Parts List

JBEDsol
Collaborator
Collaborator

I want to update a parts list by multiplying a weight per unit by the quantity calculated to get a total weight.  How do I do this?  I have a weight per unit added to custom properties as a number.  I could alter this to a parameter if it helps.

0 Likes
377 Views
3 Replies
Replies (3)
Message 2 of 4

WCrihfield
Mentor
Mentor

Hi @JBEDsol.  I saw this done years ago, and tried it a couple times myself, but haven't used it in a long time, so I will try to describe how to do this little trick from memory.  This sort of thing can be done within the Parts List editor dialog, and kept accurate automatically, when done right, without the need for any code.

When you use the Column Chooser tool, you can insert a new 'custom' column by choosing User Properties from the upper right drop-down list, then click the [New Property] button.  Enter something like "TOTAL MASS", or whatever you want to title that column, and when you click OK, it will automatically be put into the list on the right.  Then you can position it wherever you want that column to be using the [Move Down] or [Move Up] buttons below that.  Now click OK to exit that Column Chooser dialog.  Now right-click on the header of that column in the Parts List editor dialog, and choose Format Column.  In that Format Column dialog, choose the Substitution tab, then click Enable Value Substitution.  Now click the drop-down under 'When exists, use value of', and choose 'Browse Properties'.  Now click on the top drop-down list and change it to Parts List.  Now choose Mass, and click OK.  Now click on the drop-down under 'When rows are merged, value used is', and change that to 'Sum of Values.  Now click OK on the main dialog.  That should result in the Mass for that line item to be multiplied by the Item Quantity of that line item, and display the results in that column for each row.

Wesley Crihfield

EESignature

(Not an Autodesk Employee)

0 Likes
Message 3 of 4

JBEDsol
Collaborator
Collaborator
Thanks, and that definitely gets me a little farther. However the problem is that I can't use the mass. Mass can be entirely different. Ie, we pull a model from a vendor, technically the mass is something entirely different than what's calculated. I also have the dangdest time trying to get custom materials to transport w/ a model (especially when it's a custom CC part).

So I tried creating a custom property where I could sum the "total weight" property (property is set to number, not text). I get instead of a sum the *Varies* error.
0 Likes
Message 4 of 4

jjstr8
Collaborator
Collaborator

It would be the same with a custom iProperty as @WCrihfield  described.  Since you're in a drawing, the custom iProperties of the underlying components aren't shown under "User Properties".  Just create a new property and if any components in the BOM have a matching custom iProperty, it will show up in the parts list.

jjstr8_0-1674574081739.png

 

0 Likes