Inventor Customization

Inventor Customization

Posts: 216
Registered: ‎07-28-2007
Message 1 of 2 (574 Views)
Accepted Solution

Call iLogic Form Via API

574 Views, 1 Replies
02-06-2013 02:28 PM

I've read lots of posts with no answers and was wondering, is it possible to call up an iLogic form via the API?


I have an iLogic form which is in a part. That part is in an assembly which gets called up on an IDW.

So the structure looks like this: IDW > IAM > IPT : Form


I want to be able to call that form up from the IDW using a rule as iLogic / Pure either is fine.


Autodesk guys, if this is not possible please let me know, I have tried lots of workarounds to try and get it to work but nothing has worked.


Any help is much appreciated.


Thanks, Matt.


Windows 7 | Inventor Pro 2012

Posts: 216
Registered: ‎07-28-2007
Message 2 of 2 (564 Views)

Re: Call iLogic Form Via API

02-06-2013 05:51 PM in reply to: matt_jlt

Ok, found a solution (mostly due to an old post i found on the subject). I'll post it here for anyone interested.


In the IDW level I have a rule that gets reference to the part document from a view and executes a rule inside that that runs the form.


Public Sub Main()

	' Get iLogic Addin
    Dim iLogicAuto As Object = GetiLogicAddin(ThisApplication)
    If (iLogicAuto Is Nothing) Then Exit Sub
	' Get reference document
	Dim oRefDoc As Document = ActiveSheet.View("ViewName").ModelDocument	
	' Run rule
	iLogicAuto.RunRule(oRefDoc, "Rule - Run Form")
End Sub

Function GetiLogicAddin(oApplication As Inventor.Application) As Object
	' Get addin collection & addin variables
  Dim addIns As ApplicationAddIns = oApplication.ApplicationAddIns
  Dim addIn As ApplicationAddIn
  Dim customAddIn As ApplicationAddIn
  For Each addIn In addIns
    If (addIn.ClassIdString = "{3BDD8D79-2179-4B11-8A5A-257B1C0263AC}") Then
    	customAddIn = addIn
    Exit For
    End If

  If (customAddIn Is Nothing) Then Exit Function
  Return customAddIn.Automation
End Function

 Regards, Matt.

Are you familiar with the Autodesk Expert Elites? The Expert Elite program is made up of customers that help other customers by sharing knowledge and exemplifying an engaging style of collaboration. To learn more, please visit our Expert Elite website.
Need installation help?

Start with some of our most frequented solutions or visit the Installation and Licensing Forum to get help installing your software.