We would like to add the "Area of Flat Pattern" to the bill of material we generate from an assembly. We are able to generate everything else from the iproperties, but cannot generate this. This would allow us to be able to multiply this by a cost factor and know exactly what our sheet metal costs are in a part. We are trying to move away from manual BOM's and let them be generated by the models instead. Currently iv'e added a custom column within the BOM but cant figure out how to map that to the property that i can map it to within a DWG. I know this property already exists because we have it generated on our DWG's as shown. Any help would be greatly appreciated.
Solved! Go to Solution.
Solved by marcin_otręba. Go to Solution.
The below will return the area of the bottom face of the flat pattern. In order for this to work, a Flat Pattern already needs to exist.
iProperties.Value("Custom", "Area of Flat Pattern") = ThisApplication.ActiveDocument.ComponentDefinition.FlatPattern.BottomFace.Evaluator.Area
Note that this value will be returned in Square centimeters, so you should convert accordingly.
Now that i see the images, It seems that you may want the extents area. That is a bit easier.
iProperties.Value("Custom", "Area of Flat Pattern") = SheetMetal.FlatExtentsLength * SheetMetal.FlatExtentsWidth
Have you ever used iLogic before?
You would need to insert this into a new rule, and setup a trigger to run the rule, probably at every change.
Here is a link to the iLogic Basics.
There are also lots of good resources on youtube for learning about iLogic.
I've vaguely looked into iLogic before but nothing too deep. Ill look into it and do some research, thanks again for the help!
You don't need to know ilogic at all... just pyt new user parameter to your sheet metal template... like in photo, then just add it to you bom... if you want to add it to existing files use the find all files in windows explorer and RMB on them, then go to iproperties and add iproperty and click ok on it ... if you need some code then write to me i will help you with that...
Thank you sir, this did exactly what i needed it to do!
I will still be looking into iLogic to better understand it but this accomplishes what i needed for this specific task. I appreciate the help from both of you gentleman.
Can't find what you're looking for? Ask the community or share your knowledge.