Adding values from within a BOM

Adding values from within a BOM

Anonymous
Not applicable
1,704 Views
6 Replies
Message 1 of 7

Adding values from within a BOM

Anonymous
Not applicable

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

 

0 Likes
1,705 Views
6 Replies
Replies (6)
Message 2 of 7

ekinsb
Alumni
Alumni

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
0 Likes
Message 3 of 7

Anonymous
Not applicable

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

 

 

0 Likes
Message 4 of 7

Anonymous
Not applicable

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

0 Likes
Message 5 of 7

ekinsb
Alumni
Alumni

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
0 Likes
Message 6 of 7

Anonymous
Not applicable

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?
 

0 Likes
Message 7 of 7

Anonymous
Not applicable

Void last post

 

It works fine, thak you very much

0 Likes