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: 

iLogic to change feature occurrence upon opening part by user

4 REPLIES 4
SOLVED
Reply
Message 1 of 5
Anonymous
867 Views, 4 Replies

iLogic to change feature occurrence upon opening part by user

I downloaded a model off a website, it is, (excuse my electrical background ignorance) a jumper for terminal blocks.

 

Our electricians use these and cut them down to size as needed.

 

Is there a way to use iLogic and a form or message box, to prompt upon opening the part as to how many jumpers are needed for the current assembly?

 

It comes stock with 10, but they sometimes only use 2, 3 4 etc. etc..

 

I didn't model the part, but I can if it will make the rule easier to write.

 

My idea I suppose was to have the part modeled with 2 jumpers and then use ilogic to create more if necessary.

 

I am looking for snippets or previous ilogic to use as a reference as ilogic is still new to me.

 

Thanks

 

Thanks!

4 REPLIES 4
Message 2 of 5
jdkriek
in reply to: Anonymous

Very simple in your case (see attached part).

 

1. Create a parameter called QTY with UL type, enter 1 for it's value

 

2. Change all pattern quantities to the parameter QTY

 

3. Create a rule with this code:

 

QTY = InputBox("Enter QTY", "QTY", QTY)
RuleParametersOutput()
iLogicVb.UpdateWhenDone = True

4. Run the rule!

 

Additional: You could set it's event trigger for "New Document" and save as template 😉

 

Hope this helps!

Jonathan D. Kriek
MFG Solutions Engineer
KETIV Technologies, Inc.


Message 3 of 5
jdkriek
in reply to: jdkriek

The only thing missing at that point is the orginal Extrusion1 for the back plate.

 

You can add a simple formula to it driven by the new QTY parameter (see attached part)

 

(Driven off the center of the first hole to the end line)

 

Length = 6.1 mm * QTY - 3.6 mm
Jonathan D. Kriek
MFG Solutions Engineer
KETIV Technologies, Inc.


Message 4 of 5
Anonymous
in reply to: jdkriek

I knew it wasn't going to be that tough of a rule, but WOW, haha

 

3 short lines, I set up a trigger and it works perfect!

 

Thanks,

 

I was thinking about this last night though, and I am not sure exactly how this is going to work now with assemblies and qty's for parts lists.

 

Example, on a control board we used 3 sets of two jumpers and 4 sets of six jumpers.

So 7 total parts, but 2 different sizes. Is there a way to differentiate the 2 different sets in a part lists? (even though they will share a part number?)

 

I am going to make a test assembly and see what results I get.

 

 EDIT:

 

I figured this would happen, I can only use one size in the assembly. If I place 2 sets of six jumpers and try an add a eight jumper part, they all change to 8.

 

I think simplist solution is to create a part number for each size, 2,3,4,5, jumpers etc etc..

 

Thanks for the iLogic help though!!

Message 5 of 5
jdkriek
in reply to: Anonymous

Sean,

 

You're quite welcome 😉

 

Indeed, adding multiple instances of the same part and changing it will result in all instances changing.

 

At least this can be a "start part" or template to create those other parts you need.

Jonathan D. Kriek
MFG Solutions Engineer
KETIV Technologies, Inc.


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

Post to forums  

Autodesk Design & Make Report