I have done a lot of digging since I last asked this question, and feel that I have finally found an answer.
Because I see that it is a question that has been asked a few times, and has gotten little in the way of a response, I wanted to revive this thread with my findings so that maybe others won't find themselves as lost as I was.
A copy / paste from my comment over on the Being Inventive Blog : http://beinginventive.typepad.com/being-inventive/2011/10/creating-ilogic-rules-automatically.html
(For some reason, it seems that my comment has disappeared, or is being validated by an admin, so if you don't see it, I apologize)
------------------------------------------------------------------------------
Basically, the Event Triggers that can be found in the Inventor UI, can be set using a document's PropertySet "iLogicEventsRules". Each different Event Trigger has a corresponding Property Name, as well as a Property ID that (seems as if it) has to fall within a number range stemming from a set base value. In addition, each base Property Name ends with a numerical value that indicates the place in line that whatever Property Value (in this case, an iLogic Rule) assigned to it, will fire off.
So as an example, you would end up with a Property that looks something like this :
("Rule1", "AfterDocOpen0", 400)
So we want an iLogic Rule named Rule1 to go off after the document has been opened. Because it's the first rule that has had that Event Trigger applied to it, the "AfterDocOpen" has the lowest numerical value applied to it; 0.
If I wanted to add a different rule to the same Event Trigger, it might look something like this :
("Rule2", "AfterDocOpen1", 401)
Notice how the value after the "AfterDocOpen" has changed? That shows that it will fall into line right after the AfterDocOpen0.
------------------------------------------------------------------------------
I have made a VB.Net Project / source, that I have sent to my Box.com profile for anyone to download : http://www.box.com/s/pzoz3vq88qesz6mcpm1p
Inside of the .zip, you will find all of the source code that I used in making an iLogic rule injector, that also sets up any Event Triggers that the user selects. Essentially it will iterate through a number of user selected files, open them one by one, create the rule that they have made inside of the editor, apply any triggers, save the part and then close it. It was a project that I started in order to make my job a bit easier, but feel that it may make the lives of others, a little easier as well.
NOTE: This is the FIRST proper programming that I've done, so if you find something that breaks it, feel free to send me a PM detailing what went wrong. I tried to do as much testing as I could, but there's always something that a person can miss.
------------------------------------------------------------------------------
Just in case that my comment doesn't end up returning back, over on the Being Inventive blog, I will post the table of the Event Triggers / Names / IDs that I have found so far :
------------------------------------------------------------------------------
CheckList Box Name: : Property Name : : Property ID
----------------------------------------------------------------------------------------
After Open Document : AfterDocOpen : 400
Close(Document) : DocClose : 500
Before Save Document : BeforeDocSave : 700
After Save Document : AfterDocSave : 800
Any Model Parameter Change : AfterAnyParamChange : 1000
Part Geometry Change** : PartBodyChanged : 1200
Material Change** : AfterMaterialChange : 1400
Drawing View Change*** : AfterDrawingViewsUpdate : 1500
iProperty(Change) : AfterAnyiPropertyChange : 1600
Feature Suppression Change** : AfterFeatureSuppressionChange : 2000
Component Suppression Change* : AfterComponentSuppressionChange : 2200
iPart / iAssembly Change Component* : AfterComponentReplace : 2400
New Document : AfterDocNew : 2600
----------------------------------------------------------------------------------------
* Indicates that it's for an Assembly file only
** Indicates that it's for a Part file only
*** Indicates that it's for a Drawing file only.
Hope this can be of use to someone.
If my solution worked or helped you out, please don't forget to hit the kudos button 🙂iLogicCode Injector:
goo.gl/uTT1IB