Community
Inventor Programming - iLogic, Macros, AddIns & Apprentice
Inventor iLogic, Macros, AddIns & Apprentice Forum. Share your knowledge, ask questions, and explore popular Inventor topics related to programming, creating add-ins, macros, working with the API or creating iLogic tools.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

iLogic Coding to Disable Event Triggers

1 REPLY 1
Reply
Message 1 of 2
Anonymous
1505 Views, 1 Reply

iLogic Coding to Disable Event Triggers

Hi Everyone,

 

I have a question. I am setting up template .ipts and .idw for my company, and i run Adept to save and store my files. Now i have a code to automatically make a .idw after i save an .ipt. but then after every save (adept saves the .ipt alot of times) it will ask to make a drawing for the .ipt. well i was wondering if there is a code to put in a rule to disable the event triggers, and place that rule on the trigger after close document. so that the next time i open the document no event triggers will work.

1 REPLY 1
Message 2 of 2
Vladimir.Ananyev
in reply to: Anonymous

You may suppress / unsuppress any iLogic rule. Here is a sample:

Dim MyRuleName As String = "MagicRule"

Dim auto As IiLogicAutomation = iLogicVb.Automation
Dim oDoc as Inventor.Document = ThisDoc.Document
Dim rule As iLogicRule = auto.GetRule( oDoc, MyRuleName)

'this line suppresses my rule
rule.IsActive = False

Suppressed rule cannot be invoked by events.

Cheers,


Vladimir Ananyev
Developer Technical Services
Autodesk Developer Network

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report