I Created an iLogic Rule that sets up some parameters.
I want to Automaticaly opens each and every Part in my assembly, run this Rule, and then save it without me havig to do so manually.
Please advise.
Thanks,
Yoni
I’ve wanted to do the same thing, and when I found this: http://inventortrenches.blogspot.com/2011/08/built-for-speed-running-ilogic-rules.html I thought that it would answer all of my dreams. Sadly, when you have an assembly open, it doesn’t actually seem to cycle through all of the parts inside of that assembly and apply the rules that you have assigned to fire off on .ipt files, individually, which makes it the opposite of useful.
Perhaps someone more awesome could take that concept and turn it into a real proper workhorse.
Yoni,
Do you want to add the rule to each part permanently? Or do you only want to run it once?
If you only want to run it once, can you post the rule? It probably has to be modified so it will run in the assembly and modify the parts.
Hey MjDeck. When Yoni Gaia posts the rule, could you show us how to do it both ways? I started a previous topic about trying to figure out how to create a rule using the API, but no one has replied.
Thanks!
Could you post a link to your previous topic? Or start a new one and post the link here. It would help to keep the topics focused.
Link is here : http://forums.autodesk.com/t5/Autodesk-Inventor-Customization/Adding-iLogic-Rule-Using-the-API/m-p/3...
Thank you for any insight you can shed!
Hi Mike,
To answer your question, I only want to run the rule once on all parts.
The ilogic rule is irrelevant, but I attached it any way.
I want to be able to refer to an external iLogicVb file that I can modify every now and then.
Regards,
Yoni
Here's a modified version of your rule. It will run on all parts in an assembly (using Document.AllReferencedDocuments). It can also still be run on a single part. Notice that the code to set the iProperty value at the end is changed so that it modifies the part instead of the assembly.
why this attached piece is not working, i want to create thickness width length in iproperties and apply values extracted from rangebox.
Best regards,
Sachin