Illogic to replace internal rule with another

Illogic to replace internal rule with another

DClunie
Contributor Contributor
229 Views
1 Reply
Message 1 of 2

Illogic to replace internal rule with another

DClunie
Contributor
Contributor

Hi all

 

Any help would be appreciated, I am after an illogic rule that will replace a rule called specification and then re -add a rule to part from external location.

 

The external location ilogic rule is called Update.

 

I have circa 800 files to change some logic embedded in parts .I don’t really want to be opening one by one to do this .

 

Any suggestions please 

0 Likes
230 Views
1 Reply
Reply (1)
Message 2 of 2

WCrihfield
Mentor
Mentor

Hi @DClunie.  The good news is that what you described does sound possible, and may even not be that difficult to prepare a solution for.  We can either just delete the original rule, then create a new rule, or we can find the existing rule, then replace all (or some) of its contents with text from another source.

  • Do you want to change the name of the rule, or keep it the same?
  • How do you want to specify the 'source' code to copy into the rules?
    • Assuming we will be using a text file, or existing external rule file...how do you want to specify that file?
      • Hardcoded file path.
      • File Dialog
      • Collect list of all external rule names, show the list, pick one, get that rule, copy its text as String.
  • How do you want to specify which Inventor files to search within for the internal iLogic rules that need to be updated / replaced?
    • Specify whole directory at a time.
      • Using hardcoded directory path
      • Using Folder Browser
      • Should it also process sub folders of the one specified, or only the main one you specify?
      • What filters to use to avoid processing unnecessary files
        • File Types to process
        • Something special about those files, like part of file name.
  • How to find the internal iLogic rules within those files?
    • Is the rule name the same in all files?
      • If not, maybe part of the rule name is consistent?
  • Will anything need to change about the iLogic 'Event Triggers.?

PS.  If the rule being updated/replaced is being used by any iLogic 'Event Triggers', then we change the name of that rule, or delete the original rule, then create a new rule, even if name of new rule is the same, that will likely mess up the 'Event Triggers' setting for that rule.  Also, if the internal rule contained some blue, unquoted parameter names that were being used to trigger the rule to run when those parameter names changed, and we replace the code within that rule, or replace the rule, the rule may then need to be 'regenerated', to 'reconnect' those parameter names to those parameters.  But when you 'regenerate' the rule, that also runs the rule.  Not sure if that parameter name 'disconnect' will happen though, so some testing may be in order before doing something like this on a large scale.

Wesley Crihfield

EESignature

(Not an Autodesk Employee)

0 Likes