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

iLogic Triggers - all off - batch publishing

andrew_canfield
Collaborator

iLogic Triggers - all off - batch publishing

andrew_canfield
Collaborator
Collaborator

Hello.

 

I have code to batch publish by opening & closing files - the filepaths are saved in excel, all good.

Some drawing have ilogic triggers which open iproperty windows - not needed for the publishing operation.

Found this option below & wondering if the option could be set to 'None - all events disabled' at the start of the batch run &  then returned to 'All events enabled'?

 

trigger.JPG

 

Regards

 

Andrew

0 Likes
Reply
Accepted solutions (1)
296 Views
2 Replies
Replies (2)

CattabianiI
Collaborator
Collaborator

Here's an iLogic rule to set All Events Disabled option.

'    kAllEventsEnabled = 119809, 
'    kAllEventsEnabledExceptAfterOpenAndClose = 119810, 
'    kNoEventsEnabled = 119811,

ThisApplication.iLogicOptions.EventTriggersFilter = iLogicEventTriggersFilterEnum.kNoEventsEnabled

 

WCrihfield
Mentor
Mentor
Accepted solution

Just to add to what @CattabianiI contributed...in another post (couldn't recall the link to that post), Mike Deck from Autodesk informed us that the similar settings that we can set by code may not visually effect those options you see out in the user interface, because the similar settings in the user interface actually over rule the settings you have access to through the code, for security reasons.  And below are the common iLogic lines for setting those similar settings:

 

iLogicVb.Automation.EnterDelayedRuleRunningMode
iLogicVb.Automation.RulesEnabled = False
iLogicVb.Automation.RulesOnEventsEnabled = False
bInDrrm = iLogicVb.Automation.InDelayedRuleRunningMode
iLogicVb.Automation.ExitDelayedRuleRunningMode
oRRO = iLogicVb.Automation.GetRuleRunningOrderOption(oDoc)
iLogicVb.Automation.SetRuleRunningOrderOption(oDoc, RuleRunningOrder.Browser)
iLogicVb.Automation.SilentOperation = True

Edit:  Another tactic I had used in a few projects was to suppress all the internal/local rules in target documents before 'processing' them, then un-suppress the rules when done.  That also worked out just fine for me, but obviously involves a little more code & processing.  I had certain specific reasons for doing things that way at the time though.

 

Wesley Crihfield

EESignature

(Not an Autodesk Employee)