Inventor Customization

Reply
Mentor
Posts: 199
Registered: ‎07-28-2007
Message 1 of 2 (469 Views)
Accepted Solution

Call iLogic Form Via API

469 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 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

Mentor
Posts: 199
Registered: ‎07-28-2007
Message 2 of 2 (459 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
  Next

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

 Regards, Matt.

You are not logged in.

Log into access your profile, ask and answer questions, share ideas and more. Haven't signed up yet? Register

Announcements
Are you interested in helping shape the Autodesk Community?
We’re looking at a few different ways to improve the “All Forums” landing page and need your feedback! If interested, please take a few minutes to fill out the following Usability Study. Thank you for your time!

Need installation help?

Start with some of our most frequented solutions to get help installing your software.

Ask the Community


Inventor Exchange Apps

Created by the community for the community, Autodesk Exchange Apps for Autodesk Inventor helps you achieve greater speed, accuracy, and automation from concept to manufacturing.

Connect with Inventor

Twitter

Facebook

Blogs

Pinterest

Youtube