Inventor General Discussion

Reply
New Member
carissadoors
Posts: 1
Registered: ‎10-31-2012
Message 1 of 3 (402 Views)

Double Qtys using ILogic?

402 Views, 2 Replies
10-31-2012 12:34 PM

I have a large assembly that is controlled by ILogic.  It changes the lengths of parts and adds in duplicate parts as needed.  The assembly makes up one half of the total project.  In reality there will be two of these assemblies mirrored.  I don't want to insert all the parts a 2nd time or create a higher assembly.  I simply want to show Qty in my Parts List and a custom field called "Qty/Job" that doubles Qty.  I can't figure out how to take the value of Qty and mulitply it by 2 using ILogic.  I've also tried creating a custom IProperty for the parts set to "2", but it doesn't add up for each instance.  Is there any way to do this without creating a higher assembly that uses the assembly twice?

Distinguished Mentor
swordmaster
Posts: 538
Registered: ‎12-15-2008
Message 2 of 3 (394 Views)

Re: Double Qtys using ILogic?

10-31-2012 02:30 PM in reply to: carissadoors

you can override the BOM quantity using the following ilogic code

ThisBOM.OverrideQuantity( "Model Data", partNumber, quantity)
however i see no way to multiply the quantity by 2, the code needs a quantity value inserted

ThisBom.OverrideQuantity("Model Data", mypart, 99)

Inventor 2010 Certified Professional
New Member
drslayer35
Posts: 2
Registered: ‎05-25-2013
Message 3 of 3 (236 Views)

Re: Double Qtys using ILogic?

09-11-2013 12:53 PM in reply to: swordmaster

In your assembly, add a custom parameter "TOTAL_PCS", make it unitless

In each part, add a custom parameter "TOTAL_QTY_JOB", make it unitless

Now in your BOM in your idw, add a custom column "TOTAL_QTY_JOB"

 

Here is the code in the assembly that will make it work. 

 


quantity = ThisBOM.CalculateQuantity("Model Data", 1234)*TOTAL_PCS
Parameter("jlw-511022-SPP01BR:1", "TOTAL_QTY_JOB") = quantity
quantity = ThisBOM.CalculateQuantity("Model Data", 8811)*TOTAL_PCS
Parameter("jlw-511022-SPP01Y:1", "TOTAL_QTY_JOB") = quantity
quantity = ThisBOM.CalculateQuantity("Model Data", "77-66")*TOTAL_PCS
Parameter("jlw-511022-SPP01BT:1", "TOTAL_QTY_JOB") = quantity
 

 

You are not logged in.

Log into access your profile, ask and answer questions, share ideas and more. Haven't signed up yet? Register

Announcements
Are you familiar with the Autodesk Expert Elites? The Expert Elite program is made up of customers that help other customers by sharing knowledge and exemplifying an engaging style of collaboration. To learn more, please visit our Expert Elite website.

Need installation help?

Start with some of our most frequented solutions to get help installing your software.

Ask the Community


Inventor Exchange Apps

Created by the community for the community, Autodesk Exchange Apps for Autodesk Inventor helps you achieve greater speed, accuracy, and automation from concept to manufacturing.

Connect with Inventor

Twitter

Facebook

Blogs

Pinterest

Youtube