Copy iLogic rule from one part to another

Copy iLogic rule from one part to another

karthur1
Mentor Mentor
2,607 Views
5 Replies
Message 1 of 6

Copy iLogic rule from one part to another

karthur1
Mentor
Mentor

I have a iLogic rule that I want to add to a few parts.  I know that I can copy the code from my rule and paste it into my part, but is there an easier way?  Don't want to use an external rule.  I want it to still be a "local" rule.  I would like to be able to RMB on the rule, choose "Copy Rule", go to my new part and choose "Paste New rule".  Then I get the same rule name and all the code.

 

I found a couple Ideas on this.  One here and one here.  I voted for both.

 

Kirk

0 Likes
2,608 Views
5 Replies
Replies (5)
Message 2 of 6

mcgyvr
Consultant
Consultant

@karthur1 wrote:

 I know that I can copy the code from my rule and paste it into my part, but is there an easier way? 

 

Kirk


Thats pretty easy already isn't it.. Smiley Tongue

But yes.. There is no copy rule/paste local rule without doing what you already said..

You can also make rule "snippets" but its still basically the same process..



-------------------------------------------------------------------------------------------
Inventor 2023 - Dell Precision 5570

Did you find this reply helpful ? If so please use the Accept Solution button below.
Maybe buy me a beer through Venmo @mcgyvr1269
0 Likes
Message 3 of 6

Mark.Lancaster
Consultant
Consultant

@karthur1

 

I would recommend that you make global rules instead of file specific ones.

 

Also not sure if this still works but there's an iLogic Code Injector http://beinginventive.typepad.com/being-inventive/2012/08/major-upgrade-to-the-ilogic-code-injector-... Fill it with your favorite code and inject it into thickness part of your part file..  Smiley LOL

Mark Lancaster


  &  Autodesk Services MarketPlace Provider


Autodesk Inventor Certified Professional & not an Autodesk Employee


Likes is much appreciated if the information I have shared is helpful to you and/or others


Did this resolve your issue? Please accept it "As a Solution" so others may benefit from it.

Message 4 of 6

karthur1
Mentor
Mentor

@mcgyvr wrote:


Thats pretty easy already isn't it.. Smiley Tongue

But yes.. There is no copy rule/paste local rule without doing what you already said..

You can also make rule "snippets" but its still basically the same process..


It is pretty easy. But it is longer than it needs to be. Never understood why we can't just copy the entire rule and paste it into the file that we want.

Message 5 of 6

jtylerbc
Mentor
Mentor

@Mark.Lancaster wrote:

 

Also not sure if this still works but there's an iLogic Code Injector http://beinginventive.typepad.com/being-inventive/2012/08/major-upgrade-to-the-ilogic-code-injector-... Fill it with your favorite code and inject it into thickness part of your part file..  Smiley LOL


 

Code injector still works as of Inventor 2018.  Haven't tried it on 2019 yet.

Message 6 of 6

Anonymous
Not applicable

I agree with @karthur1  that copying over rules is very time consuming... especially for us Cad Admins that are working to update the design processes at a company who has never used iLogic... its fine for new, from scratch, projects since the codes that are best locally are in the templates, but to do a copy design and have the parts use the current standard parameters & properties it takes some time... 

as for using global rules...Yes, that is best most of the time...but unless you @Mark.Lancaster , or anyone else, knows of a better/more reliable way to drive custom parameters, eg: width, length, ft^2, etc, then I have found local rules works best...in what little time I have had to work with/trouble shoot the coding, using global rules always returns errors for parameters.

Note that we cant just use Custom iProperties because it requires a custom formatting to export/import into our purchasing software.

 

I will try this injector and see what its all about though... i see a couple laughing face emojis so im little worried lol...

0 Likes