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: 

Adding values from within a BOM

6 REPLIES 6
Reply
Message 1 of 7
Anonymous
1600 Views, 6 Replies

Adding values from within a BOM

Hello All,

 

        I have a basic assembly with a few kitchen cabinets. I would like to total up the length of my moulding and have the waste included. Can someone point me in the right direction on how to go about this. Is it possible to do this within Autodesk Inventor without exporting it to excell? Thank you

 

6 REPLIES 6
Message 2 of 7
ekinsb
in reply to: Anonymous

A VBA macro can be written to do this.  I can write up a small sample but need to know how you identify which parts are molding parts.  For example, is there something common in the part number or the description?  Also, once you've found a molding part, how do you know how long it is.  Is there a parameter that defines the length?  If so, does it have a consistent name?  And finally, how do you determine waste?


Brian Ekins
Inventor and Fusion 360 API Expert
Mod the Machine blog
Message 3 of 7
Anonymous
in reply to: ekinsb

Thank you for your reply,

 

Is there something common in the part number or the description?

Each description will have the company and profile #. example  (Old World_1074-01),(White River_CR-881-01) these are iparts. The suffix will be added as we place new parts into the assembly. (-01, -02, -03)

 

Is there a parameter that defines the length?  If so, does it have a consistent name

I have a property field called (Length) that generates the display of the value.

How do you determine waste?

example: add 30% to total linear footage

We would like Inventor to total all the length fields for each moulding and add 30% to get out total.

 

Thank you again for your time

 

 

Message 4 of 7
Anonymous
in reply to: Anonymous

I will add the word molding in the catagory iproperties for each molding ipart. This will help group the molding as needed.

Message 5 of 7
ekinsb
in reply to: Anonymous

I've tried to answer your question in the latest post on my blog.  http://modthemachine.typepad.com/my_weblog/2010/09/totaling-the-length-of-parts-in-an-assembly.html  Hopefully it helps.


Brian Ekins
Inventor and Fusion 360 API Expert
Mod the Machine blog
Message 6 of 7
Anonymous
in reply to: Anonymous

The post looks great, Thank you for your time

 

I am trying to implement this script, however I am receiving a error.

 

Run-time error '13':

Type mismatch

' Main program that computes the total length of all molding
' parts in the active assembly.
Public Sub ComputeMoldingLength()
   Dim asmDoc As AssemblyDocument
   Set asmDoc = ThisApplication.ActiveDocument
   Dim asmDef As AssemblyComponentDefinition
   Set asmDef = asmDoc.ComponentDefinition

 

The line above in red is highlighted in yellow.

I am doing this in a Inventor DWG file, is that correct?or should I be doing this in a IAM file?
 

Message 7 of 7
Anonymous
in reply to: Anonymous

Void last post

 

It works fine, thak you very much

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report