How programmatically to know if iLogic form is shown/closed

How programmatically to know if iLogic form is shown/closed

oleksandr.chumakov
Contributor Contributor
300 Views
1 Reply
Message 1 of 2

How programmatically to know if iLogic form is shown/closed

oleksandr.chumakov
Contributor
Contributor

Hi everyone.
I try to create some drawing programmatically (via C#) using some template. That drawing template has some iLogic rule. The rule starts on drawing creation (Rules Triggered by Events -> New document). The rule shows some form. The form needs for user action.
I want to know (programmatically) if user close the form.

Is there any way to do that?

Maybe here some method to know if any form shown?

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

oleksandr.chumakov
Contributor
Contributor

I come to a conclusion that I need iLogic AddIn object. But I stuck with a connection.

string iLogicGuid = "{3BDD8D79-2179-4B11-8A5A-257B1C0263AC}";
ApplicationAddIn iAppAddIn = iApp.ApplicationAddIns.ItemById[iLogicGuid];
if (iAppAddIn == null) { MessageBox.Show("Can't connect to iLogic"); return; }
Autodesk.iLogic.Interfaces.IiLogicAutomation iLA = (Autodesk.iLogic.Interfaces.IiLogicAutomation)iAppAddIn.Automation; //There I have an exception "Interface doesn't support". 

Can anyone help me?

0 Likes