Is a global SIZE column in the BOM possible?

Is a global SIZE column in the BOM possible?

rogmitch
Advocate Advocate
553 Views
3 Replies
Message 1 of 4

Is a global SIZE column in the BOM possible?

rogmitch
Advocate
Advocate

I have written code to allow me to pick the dimensions of a part and update the dimension parameter name from a list of choices presented in a form e.g. length, width, thickness, outer_diameter, wall etc. 

 

The parameters are exported and I can get overall sizes in the BOM with relevant expressions in columns.  So far so good.

 

What I would like to do is have a global SIZE column in the BOM which has expressions that vary based on another custom iproperty (PartType) which defines the part.  So for example if the PartType was 'circular plate' the expression in that parts row of the SIZE column would be <outer_diameter>x<Thickness> while if the PartType was 'tube' the expression in the that parts row would be <Outer Diameter>x<Wall>x<Length> etc

 

If I could do this I would not need different columns to define the sizes of every different type of material we use and also limit the number of parameters the user needs to choose from when picking part dimensions.

 

However looking at the BOM API I do not see an obvious way to alter the expressions.  If anybody knows any better I would very much appreciate a pointer in the right direction

 

Roger Mitchell

 

 

0 Likes
Accepted solutions (1)
554 Views
3 Replies
Replies (3)
Message 2 of 4

rogmitch
Advocate
Advocate

Oops! The original post should have been ....if the PartType was 'tube' the expression in that parts row would

be <outer_diameter>x<Wall>x<Length> etc -i.e use of the same custom property (outer_diameter) for both 'tube' and ''circular plate'  type parts.

0 Likes
Message 3 of 4

Anonymous
Not applicable
Accepted solution

Hi rogmitch,

 

This should be simple to sort out with an "If" Statement in you iLogic code. Something like this:

 

If PartType = "Tube" Then

iProperties.Value("Custom","SIZE") = OuterDim & "x" & Wall & "x" Length

Else If PartType = "Disc"

iProperties.Value("Custom","SIZE") = Diameter & "x" & Thickness

End If

 

You can replace the word "SIZE" with any name of your choosing. If the word matches the name of one of your BOM columns, then that data will appear in the table.  The "&" and "x" just mean that the parameters will return in a sequence and not added toegther.

 

You'll need some parameter like PartType to distinguish which data format will be used. You're best creating a Multivalue parameter with all the types listed. You can do this by right clicking on the parameters value in the parameter editor. The lists are editable through iLogic, but we'll keep it is as simple as possible for now.

 

Hope this helps

 

GavoGarmo

 

0 Likes
Message 4 of 4

rogmitch
Advocate
Advocate

Thanks GavoGarmo,

 

I have implemented your suggestion and it works very well. 

 

I appreciate the help.

 

Roger Mitchell

 

0 Likes