And here is an example of how to remove just one specific internal iLogic rule, by its name, from within a specified document.
If iLogicVb.Automation.GetRule(ThisDoc.Document, "Internal Rule Name") IsNot Nothing Then
iLogicVb.Automation.DeleteRule(ThisDoc.Document, "Internal Rule Name")
End If
...or, you could suppress the rule, instead of deleting it, like this:
Dim oRule As iLogicRule = iLogicVb.Automation.GetRule(ThisDoc.Document, "Internal Rule Name")
If oRule IsNot Nothing Then oRule.IsActive = False
...or, you could disable the rule from automatically running when parameter values change, and change other settings of the rule, like this:
Dim oRule As iLogicRule = iLogicVb.Automation.GetRule(ThisDoc.Document, "Internal Rule Name")
If oRule IsNot Nothing Then
'oRule.IsActive = False
oRule.AutomaticOnParamChange = False
oRule.FireDependentImmediately = False
oRule.SilentOperation = True
'oRule.Name = "Some Other Rule Name"
'oRule.Text = "Some other rule contents."
End If
But keep in mind, the code in my previous response only deletes the local settings (the settings that only effect this one specific document), not the other Event Triggers settings that will effect all documents of a certain type. And the setting in this last code for disabling this rule from running when parameter values change is not talking about the setting in the Event Triggers dialog box, because a setting there would override this setting. The setting in this code above, would only effect if you included any blue, unquoted parameter names within this rule, then when the values of those blue parameters change, that would normally cause this rule to be triggered to run. This setting can disable that specific functionality.
Wesley Crihfield

(Not an Autodesk Employee)