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: 

Call iLogic Form Via API

1 REPLY 1
SOLVED
Reply
Message 1 of 2
matt_jlt
2098 Views, 1 Reply

Call iLogic Form Via API

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 vb.net 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

Tags (2)
1 REPLY 1
Message 2 of 2
matt_jlt
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
  Next

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

 Regards, Matt.

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

Post to forums  

Autodesk Design & Make Report