Community
Inventor Programming - iLogic, Macros, AddIns & Apprentice
Inventor iLogic, Macros, AddIns & Apprentice Forum. Share your knowledge, ask questions, and explore popular Inventor topics related to programming, creating add-ins, macros, working with the API or creating iLogic tools.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Add Area of Flat to Bill of Material

8 REPLIES 8
SOLVED
Reply
Message 1 of 9
Anonymous
1274 Views, 8 Replies

Add Area of Flat to Bill of Material

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. 

8 REPLIES 8
Message 2 of 9
Anonymous
in reply to: Anonymous

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. 

Message 3 of 9
Anonymous
in reply to: Anonymous

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
Message 4 of 9
Anonymous
in reply to: Anonymous

Thank you for the help. Where do i enter that text? 

Message 5 of 9
Anonymous
in reply to: Anonymous

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. 

 

Message 6 of 9
Anonymous
in reply to: Anonymous

Here is a link to the iLogic Basics

There are also lots of good resources on youtube for learning about iLogic. 

Message 7 of 9
Anonymous
in reply to: Anonymous

I've vaguely looked into iLogic before but nothing too deep. Ill look into it and do some research, thanks again for the help!

Message 8 of 9
marcin_otręba
in reply to: Anonymous

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...

area.png

 

 

 

 

 

 

 

Message 9 of 9
Anonymous
in reply to: marcin_otręba

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.

Post to forums  

Autodesk Design & Make Report