Quantcast
Channel: Manufacturing DevBlog
Viewing all articles
Browse latest Browse all 532

column of BOM for “Area”of component

$
0
0

By Xiaodong Liang

Question:
Is there any way to get an area for the entire assembly on the BOM?  If you go to iProperties --> Physical it is shown there. But how to pull it from there and have it as Column in BOM? Can it be done using API ?

Solution:
Firstly, currently, no API to add/remove column of BOM. You have to add it manually in advance. The following is the steps to achieve your requirement. This also applies to Mass/Volume or other iProperties.

1. In the component file (such as a part), add one custom iProperty manually e.g. named  “Area”. The type is Text.

image

2. add a iLogic rule with the component file. It will get the Area value from iProperty, and update the custom iProperty.

image

'current documentdoc=ThisDoc.Document'unit manager of the documentoUOM=doc.UnitsOfMeasure'get the value of AreasurfaceArea=iProperties.Area'round the value with 4 valid numbers (optional)surfaceArea=Round(surfaceArea, 4)'convert the value to a string with the unit of the documentsurfaceArea=surfaceArea.ToString()+""+oUOM.GetStringFromType(oUOM.LengthUnits)+"^2"'update the custom property "Area" we creatediProperties.Value("Custom", "Area")=surfaceArea

3. add this rule with the iLogic trigger “Part Geometry Change”thus when the model changes, the rule will be executed automatically and update the custom property.

 

image

 

4. In the assembly >> BOM, add one custom column named “Area”.This column will read the custom property from the component.

image

 

image


Viewing all articles
Browse latest Browse all 532

Trending Articles