Bill of Materials Quantities

Bill of Materials Quantities

Anonymous
Not applicable
387 Views
2 Replies
Message 1 of 3

Bill of Materials Quantities

Anonymous
Not applicable

Hello, All

Having some trouble with an idea i have. 

Here is the run down.

I have a part Bill and an Assembly bill. I would like some code that will take the Item quantity multiply it by a user parameter called quantity and produce a result in my bom.

 

I have triedthis the most logical way i could think of,but am missing something simple i am sure.

 

So far i have tried ( Target assembly  in the code is only a place holder)

 

 

SyntaxEditor Code Snippet

ITEMQTY = Parameter("target assembly.iam.Quantity")*ITEMQTY

 Also a couple other questions,

Does anyone have a good snippet for keeping dimensions in place when some thing is patterned. Even a video or white paper on this would be great.

Also wondering about an open drawings and update from the assembly. I have found a lot of subject mater on this but nothing that works in 2017 yet.

 

Thanks in advance.

Chris

0 Likes
388 Views
2 Replies
Replies (2)
Message 2 of 3

frederik_vollbrecht
Advocate
Advocate

Hi,

 

without having a look at it, the base qty in the BOM may be stored as text instead of a value.

 

Have you tried to convert the qty?

Have a look to this post:
https://forums.autodesk.com/t5/inventor-customization/converting-text-string-into-a-number/td-p/3269...

 

 

 

0 Likes
Message 3 of 3

AlexFielder
Advisor
Advisor

Hi @Anonymous,

 

A good tip on these (or any) discussion forums is to split questions into separate threads, but if I may offer assistance on the dimensions question:

 

I haven't done a lot of work on Drawing dimensions but I recently came across this post by Brian Ekins:

 

http://modthemachine.typepad.com/my_weblog/2009/07/introduction-to-attributes.html

 

Which in and of-itself is nothing to do with what you want to achieve.

 

However, if you read that in conjunction with watching the following recorded webcast:

 

https://www.youtube.com/watch?v=bcOvYc6rNUk (NOT MY VIDEO, so props to Chris Atherton!)

 

It will start to make sense (I hope).

 

If you also open the attached Pack&Go Assembly file and run this external rule:

 

https://github.com/AlexFielder/iLogic/blob/master/Drawings/Automatic%20Drawing%20dimensions.iLogicVb

 

You will see how to automatically create (and crucially) recreate drawing dimensions inside Inventor.

 

If all you care about is the positioning of dimension text then that rule shows you how here onwards.

 

🙂

0 Likes