Announcements
Attention for Customers without Multi-Factor Authentication or Single Sign-On - OTP Verification rolls out April 2025. Read all about it here.

Hi @k.dossantosFGLW2.  Here is another version of that code that includes a an additional custom Function routine.  In this version, after you have specified the name of the iLogic rule you want to add into the Event Triggers, it will run that added custom Function, which will prompt you to select one of the available events from a list.  Then that function returns a two factor piece of data to the main routine, which will contain that internal event name, and the PropID that should be used with that event.  Those two values are used to set the values of the other two variables for you, so that you do not need to guess or look up what the proper name/spelling should be, or what values to use for the PropID.  Also, if you do not want to use that added routine, it is nice to have it available below as a reference for which names and values are available, in case you do not want to find the Excel file and review that every time.  I also have a custom Function for allowing user to select an external iLogic rule that I use in some situations, but it is longer, and more complex than the one for choosing an internal rule from the current document.  Plus, I usually do not put all these routines into one iLogic rule, but instead may have those other routines in other rules, then call those other rules to run, so I am not duplicating code.

 

There are several ways this type of overall routine could be laid out to work.  Sometimes including some user interaction can make the code more dynamic or easy to use, while other times, less or no user interactions may be wanted.  But in a case like this, if there is no user interaction, then all those specifications must be hardcoded into the rule, and the code must be edited each time you want to use different values, so there is a balance to it, and it all depends on your needs.

 

Wesley Crihfield

EESignature

(Not an Autodesk Employee)