Invisible link to external iLogic rule

Invisible link to external iLogic rule

Maxim-CADman77
Advisor Advisor
3,309 Views
17 Replies
Message 1 of 18

Invisible link to external iLogic rule

Maxim-CADman77
Advisor
Advisor

A designer reqired the help.

Occasionally Inventor showed an exception message regarding impossibility to find external iLogic rule with particular name (sorry I only have it in Russian and dont know how to get it in English):

 

Управляемое событиями правило iLogic

RunExternalRule: невозможно найти внешний файл правила с именем:  RusMaterialDescription .

 

 Additional tab contains info:

 

System.ArgumentException: RunExternalRule: невозможно найти внешний файл правила с именем:  RusMaterialDescription .

   в iLogic.LowLevelInRule.RunExternalRule(String ruleName, NameValueMap ruleArguments)

   в iLogic.EventsRuleRunner.RunRules(Document doc, iLogicCentral central, InventorEventCode eventCodeA)

 

Even so it happend in 3Dassembly environment I managed to find the IPT on which issue is reproducible.
It is a Configuration Membe.

Exception occurs on update command (even so Member seems to be saved AFTER Factory).

Please find archive with both files attached.

 

My questions are:

1. Where exactly in the IPT-file the link is stored

2. How to delete the link from those models completely?

 

Thanks in advance

 

Please vote for Inventor-Idea Text Search within Option Names

0 Likes
Accepted solutions (1)
3,310 Views
17 Replies
Replies (17)
Message 2 of 18

Mark.Lancaster
Consultant
Consultant

@Maxim-CADman77

 

Google translate can be used to translate it..  Smiley Wink 

 

Manage events iLogic rule

RunExternalRule: it is impossible to find an external rule file named: RusMaterialDescription.

 

I haven't looked at your dataset but the message usually means there's an ilogic rule that is trying to launch an external rule that name.  Did you write this code/interface or did someone else?  Also when sharing files you should always indicate your version of Inventor you're using.  At this point we have to download the zip file and then check to see what version you used.

 

Update:  This dataset is based on Inventor 2014...  But there's nothing in this ipart that you have provided.  There's no iLogic rules at all.  Why do you think its this part file causing the issue?

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.

0 Likes
Message 3 of 18

Curtis_Waguespack
Consultant
Consultant

"An System.ArgumentException is thrown: RunExternalRule: cannot find the external file named rules: RusMaterialDescription.

the iLogic. LowLevelInRule. RunExternalRule (String ruleName, NameValueMap ruleArguments)
the iLogic. EventsRuleRunner. RunRules (Document doc, iLogicCentral central, InventorEventCode eventCodeA)"
 
Hi MaximUdod,
 
I think this is saying that the external rule named in the error can not be found. Most likely the configuration path is missing or has not been set, or the external rule file is not found at the path that is named in the configuration file.
 
To check or set the Configuration path close all files and then follow the instruction here:
 
I hope this helps.
Best of luck to you in all of your Inventor pursuits,
Curtis
http://inventortrenches.blogspot.com
 
 

EESignature

0 Likes
Message 4 of 18

Maxim-CADman77
Advisor
Advisor

Yes - we are using Inv2014, build 246  (sorry I usually make this note when start new thread) 

 

For me Issue is reproducible on the Configuration Member shared.

This is how it looks just after opening:

issued_CM_of_solder1.png

 

Then I press Local Update and get the error:

iLogicEventDrivenRule_Error.png

Error Message

 

iLogic Event-Driven Rule

RunExternalRule: Cannot find an external rule file named: "RusMaterialDescription".

 

So IMHO it means some url reside somewhere in CM or CF

 

BTW: Exact English statement or error is shown when English Inv is run (who might guess ;-))

 

 

Please vote for Inventor-Idea Text Search within Option Names

0 Likes
Message 5 of 18

Maxim-CADman77
Advisor
Advisor

The referenced article seems unapplicable for Inv 2014

Please vote for Inventor-Idea Text Search within Option Names

0 Likes
Message 6 of 18

Maxim-CADman77
Advisor
Advisor

I mere guess what was that rule about (it was actual in old Inv2010).

If I put RusMaterialDescription.txt with simplest code (MessageBox.Show("Hello world!", "iLogic Message")) in Configuration Member folder I even see it be executed on Local Update.

My expectation was to make  link visible somewhere (in Event Triggers list?
But my goal is not to reanimate that rule but rather get rid of urls/links to obsolete rules 

Any ideas?

Please vote for Inventor-Idea Text Search within Option Names

0 Likes
Message 7 of 18

Curtis_Waguespack
Consultant
Consultant

@Maxim-CADman77 wrote:

The referenced article seems unapplicable for Inv 2014


Smiley Tongue Come on now, you know I can post a 2014 link that says the same thing. This is not a version issue.

EESignature

0 Likes
Message 8 of 18

Curtis_Waguespack
Consultant
Consultant

Hi MaximUdod,

 

  • It's late here (but I sometimes read up so my mind has time to simmer an issue, so...)
  • We have some 2nd language barriers (and I'm not great with my first language, so...)
  • I've still tying to get a concise statement of the issue:

 

Can you 'recap' the issue with what you know and don't know?

 

I think this is completely solvable, but it takes some understanding of what we (you and the rest of us)  don't know.

 

I think you are asking for some guess of what file is asking for the lost file, but I'm not certain if that is the technical question being asked.

 

All of that aside, we appreciate your contributions to the Inventor forum, so don't let my clumsy replies (or anyone's)  get in the way.

 

Also, if it helps please feel free to post on this forum in your natural tongue and we will use Google's translate tools as the go between. Often my second languages come out better with Google rather than through my mind translating. But as I said, my first language is sometimes questionable.

 

I hope this helps.
Best of luck to you in all of your Inventor pursuits,
Curtis
http://inventortrenches.blogspot.com

 

 

 

 

EESignature

0 Likes
Message 9 of 18

Maxim-CADman77
Advisor
Advisor

Curtis, I'm куфддн sorry for causing misunderstanding

The article you've mention does really applicable to Inv 2014 (I failed to find the "iLogic Configuration" button* on iLogic of Manage tab/iLogic pane** thus made wrong conclusion).

And yes - this piece of knowledge could be used as a fast workaround:

1. Place empty iLogic file to shared folder of fileserver, where we keep working copies of all the rest of iLogic rules

2. Add the folder to iLogic Configuration of each and every PC

 

Thanks!

 

But I still hope to find not the workaround but rather solution (how to find the link and erase it forever).

 

* I think I've never used it before (most likely read and forgotten)

** It was quite tedious day and a bit late time here ... thus my mind probably slowed down extremely (now it is morning time here)

Please vote for Inventor-Idea Text Search within Option Names

0 Likes
Message 10 of 18

Maxim-CADman77
Advisor
Advisor

Curtis,
I still think this is rather technical question (where the link resides* and how to delete it).

BTW, could you reproduce the error on dataset attached to the first post of the thread?

 

* Which of the two files (CM or CF)?

And where exactly in the file?

As soon as I was the person who was experimenting with that rule (in let say 2011 ... maybe even earlier) I'd expect to find it in Event Triggers (most likely under "Material Change" node) but in CF there is nothing there and in CM Event triggers (as well as the rest buttons of iLogic pane) is grayed out.

Please vote for Inventor-Idea Text Search within Option Names

0 Likes
Message 11 of 18

Curtis_Waguespack
Consultant
Consultant

@Maxim-CADman77 wrote:

Curtis,
I still think this is rather technical question (where the link resides* and how to delete it).

BTW, could you reproduce the error on dataset attached to the first post of the thread?

 

* Which of the two files (CM or CF)?

And where exactly in the file?

As soon as I was the person who was experimenting with that rule (in let say 2011 ... maybe even earlier) I'd expect to find it in Event Triggers (most likely under "Material Change" node) but in CF there is nothing there and in CM Event triggers (as well as the rest buttons of iLogic pane) is grayed out.


Hi MaximUdod,

 

Thanks for the clarification ( it might have just been me who was not understanding Smiley Embarassed). I could not reproduce the issue with the files you attached, and like Mark.Lancaster, I could not find any internal iLogic in those files.

 

I would think that the Event Triggers are the issue as well, but see nothing there?

 

I'm not sure what else to suggest. Smiley Frustrated

 

I hope this helps.
Best of luck to you in all of your Inventor pursuits,
Curtis
http://inventortrenches.blogspot.com

EESignature

0 Likes
Message 12 of 18

MjDeck
Autodesk
Autodesk

Hi Maxim,

The rule-on-event trigger is in the iPart member file in this case. (You could see it, if the Event Triggers command was not disabled when a member file is open in the active window.)
I attached an external rule that will delete all event triggers in the active file. (It would also delete all rules in the file, but there aren't any here.) Open the member file and run the external rule. Then save the member file. That should fix the problem.

I'm guessing that this rule-on-event trigger got into the iPart member from a part template. When a member is generated, it uses the standard IPT template. If the template has triggers and/or rules, those will be copied into the iPart member. If you don't want this, it would be a good idea to create and maintain a non-standard template that you can select (instead of the standard default) when you manually create a part. Put the event triggers and/or rules in this non-standard template. Leave the standard as is, because Inventor will use it when creating iPart members.


Mike Deck
Software Developer
Autodesk, Inc.

Message 13 of 18

ThomasB44
Mentor
Mentor

I've reproduced the error you're talking about.

If you suppress the link to iPart factory (then you can cancel this), you can see the rule set by the event trigger.

 

Capture.JPG

 

So I think that at a "X" date, this rule have been set with an event trigger to iPart factory, and propagated to the iPart member.

But if you regenerate the factory member (Rebuild all command & Regenerate command), it will disappear (I mean iPart member will be identical to the iPart factory).


Thomas
Mechanical Designer / Inventor Professional 2025
Inventor Professional EESignature

0 Likes
Message 14 of 18

Maxim-CADman77
Advisor
Advisor
Thanks for the note.
But there is something else to consider (not all Members generated at once got the Event Trigger embedded!).
That's pity it's impossible to temporary supress the link to Factory remove the trigger and unsupress link. I see only break command that can't be undone later.

Please vote for Inventor-Idea Text Search within Option Names

0 Likes
Message 15 of 18

Maxim-CADman77
Advisor
Advisor

Mike, thank you a lot

 

Yourth is almost solution I asked for.

 

Yes I've extended my desire a bit:

Not only I want to remove the link from the given file (that I've found generally due to intuition*)

but also estimate how many such files are in our Vault.

 

But strange behaviour of iLogic have failed all my attempts.

 

One of solutions that failed was to make log files with names of Inv Docs contained EventTriggers to th rule mentioned by using RusMaterialDescription.iLogicVB:

 

oWrite = System.IO.File.CreateText("D:\_\"&ThisDoc.FileName(True) & ".txt")
oWrite.Close()

 

It works like a sharm when executed manually but not when Local Update**

I niether get error message*** nor expected txt file.

 

 

* Enforced a bit with tracking Inventor calls to folders by ProcessMonitor

** My plan was to run TaskSheduler to update all files in Vault Working Folder.

*** Tthis is expected as soon as rule now in folder from iLogic Configuration

Please vote for Inventor-Idea Text Search within Option Names

0 Likes
Message 16 of 18

MjDeck
Autodesk
Autodesk

Hi Maxim,

In the file you posted, the rule is tied to the Change Material event. If you don't change the material, the rule won't run. An Update by itself is not enough.
I could send you a rule that would scan all documents in an assembly for rules on events, or specifically on the Change Material event. I could restrict it to just external rules. It would save a list of documents to a file. Would that be useful?


Mike Deck
Software Developer
Autodesk, Inc.

0 Likes
Message 17 of 18

Maxim-CADman77
Advisor
Advisor

Mike,

Yes rule that scans assembly (or folder) for rules embedded in Event Triggers would be very helpful for me.

Please vote for Inventor-Idea Text Search within Option Names

0 Likes
Message 18 of 18

MjDeck
Autodesk
Autodesk
Accepted solution

Here's a rule to run in an assembly. It will list all event-driven external rules found in that assembly and its referenced documents. The list goes to a file named ExternalRulesOnEvents_List.txt, in the same folder as the assembly. (It will also work in a part.) Each line in the list file is tab-separated data:
DocumentFileName  EventTypeAndIndex  ExternalRuleName


Mike Deck
Software Developer
Autodesk, Inc.

0 Likes