vb.net API to Prevent iLogic Popups

vb.net API to Prevent iLogic Popups

johnster100
Collaborator Collaborator
300 Views
1 Reply
Message 1 of 2

vb.net API to Prevent iLogic Popups

johnster100
Collaborator
Collaborator

Hi,

I have a small ilogic application which opens various managed assemblies and updates them. The code then opens their respective drawings and updates. The issue is that sometimes I get ilogic error boxes popping up (such as couldn't find a drawing curve in a drawing etc). 

 

I am looking for some API code to prevent ilogic error boxes from popping up similar to  'ThisApplication.SilentOperation = True'. 

 

I don't want to add try catch etc to all the code as there is quite a lot of it and I do want to get the error boxes when I am testing the application. 

 

Is there any API code which can achieve this?

 

thanks,

John

 

 

0 Likes
301 Views
1 Reply
Reply (1)
Message 2 of 2

WCrihfield
Mentor
Mentor

Hi @johnster100.  Since you are already aware of the Application.SilentOperation setting, I wander if you are also aware of the setting within each individual iLogic rule, in its Options tab, called Silent Operation.  You can check that box for each rule if you want.  That setting can also be accessed by code for each rule.  Then there is also this following iLogic line.

 

iLogicVb.Automation.SilentOperation = True

 

I think that one can be set by API too, by getting the iLogic ApplicationAddIn object, then getting its Automation object, then using that (no Intellisense though) to set this property.

Edit:  What may need to happen though, in cases where the error causes the rule to stop, is you would either need to use those Try...Catch blocks you are trying to avoid, then use Logger lines instead of MsgBox or MessageBox.Show lines within the Catch side, or use the older system with 'On Error Resume Next'.  I do not recommend that last option, but you may be able to toggle that line in your rule's remotely with another rule, like a 'switch', as preparation.  To do something like that, just get the iLogic rule, search the lines of its text for that phrase, then edit that line to either include or exclude the apostrophe character.  I don't know if I have tried that one before, but sounds doable.

 

Wesley Crihfield

EESignature

(Not an Autodesk Employee)

0 Likes