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: 

Changing the default row in an iPart Factory with iLogic

5 REPLIES 5
Reply
Message 1 of 6
jwesselsHZJ98
845 Views, 5 Replies

Changing the default row in an iPart Factory with iLogic

I am trying to write a rule in ilogic that will change the default row in an ipart factory. I have seen a lot of posts about changing them while in an assembly file, but I want to change it while I am only in my .ipt file. I essentially want to prompt the user with a input box and ask which part number they would like to see, and then after they enter the desired part number, it sets that as the new default row. You can see in the image I attached, row 1 (member number 502000) is the current default row. With this rule it would ask the user which member they would like to activate. If the user enters 502001, then it will set row 2 as the default row. Any help is greatly appreciated.

 

Thanks

 

 

5 REPLIES 5
Message 2 of 6

Hello J

 

when you create a new iLogic rule, look in the System snippets under iParts.

there is iLogic code to do things with iParts...

- find the row

- change the row...

 

is not always the first row the default...?

If this answers your question then please select "Accept as Solution"
Kudo's are also appreciated Smiley Wink

Succes on your project, and have a nice day

Herm Jan


Message 3 of 6

HermJan,

 

I'm not sure how to apply these snippets to my model. From a lot of other posts similar to this topic and also the autodesk website:

(https://knowledge.autodesk.com/support/inventor-products/learn-explore/caas/CloudHelp/cloudhelp/2014...)

 it seemed that these snippets were only to be used in an .iam file. Is it possible to apply them to strictly an .ipt file that has not been placed in an assembly? I have attached a sample part with my attempt at using these functions. 

 

Thanks

Message 4 of 6

so what you want is some kind of a configurator just for one part?

and you never use this part in an Assembly..?

 

the idea with iparts that you have a master part (factoy) and in it is some excel table.

when you are in an assembly and place this factory part it asks you to select a member.

when selected, a new file is created, derived from the master, with the different parameter from the table.

this part is save in a subfolder next to the factory part and has the same name.

Next time you select the same member, it is not new created it is used again. so normaly these part are in a library (read only)

 

If you have just one part, maybe use iLogic in stead...

 

 

If this answers your question then please select "Accept as Solution"
Kudo's are also appreciated Smiley Wink

Succes on your project, and have a nice day

Herm Jan


Message 5 of 6

This is just a simplified version of the project I am working on. My goal is to create a completely automated model that the user will be prompted with a form asking what options they would like. After that, the model will change to the correct options, and a drawing will automatically be created with balloons and drawings. To create balloons and dimensions automatically in the drawing, I am using attributes placed on faces and work points. The issue is when I generate the factory members, like you said, they are read only, and do not contain any of the necessary attributes or work points. I therefore decided to create my own ilogic code that I can run and generate each factory member. The workflow for this code is:

1. Step through each member in the factory.

2. Save current member as new .ipt file, saved with the current member name.

3. Delete the factory table in this new .ipt

4. Continue this until all members have been generated.

 

By saving each member individually as a new file and then deleting the ipart factory, the new part is saved as a working file that can be manipulated. I have all other portions of this workflow working, I just need to figure out how to step through the factory.

I have looked into not using iparts at all because of the above issues, and driving all of the part combinations from an excel document, but for various reasons I have decided to not go that route.

Message 6 of 6

so for my understanding:

- you are placing the parts into an Assembly.

- but you can't edit the parts because they are "Library parts" ... ?

 

look in the API help for iPartFactory, there are two methodes: CreateMember and CreateCustomMember.

With the CreateCustomMember you get a unique member....

 

an other way would be to put the iPart in the content center, from there you can also create a new (custom) part. advantage here is that it is not linked to some master.

 

a lot of work to get only the balloons working....

in 2019 there are some new options, where you can give faces a name to use constraining. maybe those can help you also for the balloons..?

 

 

 

If this answers your question then please select "Accept as Solution"
Kudo's are also appreciated Smiley Wink

Succes on your project, and have a nice day

Herm Jan


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

Post to forums  

Autodesk Design & Make Report