Event triggers not firing in some parts; figuring out why and how to detect

Event triggers not firing in some parts; figuring out why and how to detect

mr_ensing
Advocate Advocate
431 Views
4 Replies
Message 1 of 5

Event triggers not firing in some parts; figuring out why and how to detect

mr_ensing
Advocate
Advocate

I've got some (external) iLogic rules doing basic but important stuff. This has been working for years now.

 

In recent times I found some parts in which the event triggers are not firing. I can fix this, by adding some random other rule and then deleting again. But I cannot detect the faulty parts.

 

For example, if I inspect 2 parts with a bit of VBA code they look like this:

mr_ensing_3-1700478622513.png

The left is an example of a part for which the triggers are firing correctly.

For the example on the right the triggers are not firing.

No difference to be seen.

 

So yeah, fixing the problem is not really the problem. The problem is these parts live in an production environment and I need to detect and find them. Any ideas?

 


  

 

 

 

0 Likes
Accepted solutions (1)
432 Views
4 Replies
Replies (4)
Message 2 of 5

WCrihfield
Mentor
Mentor
Accepted solution

Hi @mr_ensing.  Have all the parts involved with these event triggers existed for a while, and those triggers worked just fine in those specific files before, but they suddenly stopped working, or are these 'new' parts that you are having troubles with?  Were all the Event Triggers settings done manually, or were some created by code process?  One odd situation we have encountered numerous times over the years when creating or editing the Event Triggers settings by code is that the settings appear to be created just fine, but the triggering is just not happening, until some manual interaction afterwards, similar to what you described to fix this issue.  In those cases, the problem seemed to have stemmed from that specific document not having a 'DocumentInterest' assigned to it for the iLogic ApplicationAddIn.  In my latest solutions for creating or editing the Event Triggers settings, one of the very first things I do is check for that, and if not found, I simply add a temporary, empty, internal iLogic rule to that document first, then proceed to create or edit those settings, then check for that specifically named, temporary rule, and if found, delete it.  That simple act of adding an internal iLogic rule to the document, adds a DocumentInterest to the document for the iLogic ApplicationAddin.  It seemed like when I just attempted to add a DocumentInterest for it directly by code, without any actual internal rules, or internal iLogic forms being present in the document, the new DocumentInterest would not stay there.  That tip came from an Autodesk employee back around 2019, I believe.  Not sure if that is the issue you are encountering though.

Wesley Crihfield

EESignature

(Not an Autodesk Employee)

Message 3 of 5

mr_ensing
Advocate
Advocate

The problem parts have existed for a while yeah. I don't really have a clue if the triggers worked before and stopped working, of never fired to begin with. I'm guessing they never fired, but that it, a guess.

 

Most files had their triggers are created by a VBA-macro. At moment of trigger creation, that same macro also (forcefully) runs the iLogic-rule, so that properties are correct at that moment. When nothing (parameters, material) changes, there is no need for the triggers to fire.

 

I just started investigating that DocumentInterests-object. It seems you are spot on.

On the left a file which event triggers fire correctly, on the right one which doesn't.

 

mr_ensing_0-1700493510099.png

 

I'll continue my investigation. Thanks.

 

On a side note, I have some bookmarks to knowledge.autodesk.com pages that go 404 now. What's up with that?

0 Likes
Message 4 of 5

WCrihfield
Mentor
Mentor

Hi @mr_ensing.  About that last question...for years we were allowed to create what was called 'Contribution' posts, that got published to the KnowledgeBase (https://knowledge.autodesk.com/community/article/######), but all those got taken down (for everyone, not just me) by AutoDesk.  I think it was around March of 2023.  Multiple reasons I guess, but sounded a bit like restructuring of their online community layout, and they created a few of the newer resources around that time.  I never cared to create my own external Blog, so I just attempted to preserve some (not all) of my articles to Microsoft Word documents, then converted them to PDFs.  All the links remain, but now they lead nowhere, because the pages were removed.

Wesley Crihfield

EESignature

(Not an Autodesk Employee)

Message 5 of 5

mr_ensing
Advocate
Advocate

@WCrihfield wrote:

... In my latest solutions for creating or editing the Event Triggers settings, one of the very first things I do is check for that, and if not found, I simply add a temporary, empty, internal iLogic rule to that document first, then proceed to create or edit those settings, then check for that specifically named, temporary rule, and if found, delete it.  That simple act of adding an internal iLogic rule to the document, adds a DocumentInterest to the document for the iLogic ApplicationAddin.  It seemed like when I just attempted to add a DocumentInterest for it directly by code, without any actual internal rules, or internal iLogic forms being present in the document, the new DocumentInterest would not stay there.  That tip came from an Autodesk employee back around 2019, I believe.  Not sure if that is the issue you are encountering though.


This workflow I works like a treat. I added an event trigger for a trivial iLogic-rule. The DocumentInterest for iLogic shows up. Event triggers added after this ended up firing successful.

 

Now to write something to check and fix this on a larger scale. Thanks.

0 Likes