How to build a standalone EXE for Inventor?

How to build a standalone EXE for Inventor?

Anonymous
Not applicable
2,958 Views
3 Replies
Message 1 of 4

How to build a standalone EXE for Inventor?

Anonymous
Not applicable

Hi all.

I have learned the Add-In(DLL) and VBA customization methods from th API file. Now I want to build a standalone EXE for inventor. But I did not find any study files or  materials to build it. Who can provide me some study materials to build the standalone EXE. Thanks very much.

Before, I used the VB.Net and Microsoft Visual studio to develop the Add-In.

Thanks again.

Accepted solutions (1)
2,959 Views
3 Replies
Replies (3)
Message 2 of 4

Anonymous
Not applicable
Accepted solution

You will need to:

1. Start a new Windows Forms Application in VB.net

2. Reference the Inventor interop file

3. Locate and reference Inventor with code similar to what is shown below

4. Write your program as you normally would

5. Publish your project

6. If you are really just after the exe file, it will be located in your project folder under bin>Debug.

 

Public oInv As Inventor.Application

 

Sub GetInventor()

  If IsNothing(oInv) Then    'If an instance of Inventor is not currently stored
    Try    'Try to get an instance that is currently running
      oInv = System.Runtime.InteropServices.Marshal.GetActiveObject("Inventor.Application")

      With oInv.FileOptions.FileOpenOptions
        .SkipAllUnresolvedFilesInDrawing = True
        .SkipAllUnresolvedFilesInAssembly = True
        .SkipAllUnresolvedFilesInPart = True
      End With
    Catch ex As Exception
      System.Windows.Forms.MessageBox.Show("Could not load Inventor.")
      Exit Sub
    End Try
  End If
End Sub

 

Hope this helps!

Message 3 of 4

Anonymous
Not applicable

Thank you very much for your reply. Under your guidance, I have made a small example. And I am very happy about that.
Your reply has solved my big problem. Next, I will continue to learn on the basis of your advice, and I hope I can continue to receive your help and advice later. Thanks a million! Best wishes!

Message 4 of 4

Anonymous
Not applicable
You are welcome!
0 Likes