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: 

Opening Inventor Part File

1 REPLY 1
Reply
Message 1 of 2
mconley
162 Views, 1 Reply

Opening Inventor Part File

I am trying to open an Inventor part file from a VBA program in Excel. I can figure out how to open an AutoCAD drawing but when I try something similar to open an Inventor part file, it will not work.

This will work to open an AutoCAD file -

Dim CADObject As Object
Set CADObject = GetObject("C:\temp\96.dwg")

but this will not work to open an Inventor Part file

Dim INVENTOR_Part As PartDocument
Set INVENTOR_Part = GetObject("C:\Inventor _ Tutorial\Marker.ipt")

I am new to VBA so please pardon me if this is obvious.

Thanks
1 REPLY 1
Message 2 of 2
SRayC
in reply to: mconley

Give this a try. I am using this with a VB stand alone routine.
Public oApp As Inventor.Application

On Error Resume Next
Set oApp = GetObject(, "Inventor.Application")
If Err Then
MsgBox "Inventor must be running."
End
End If

Set oDoc = oApp.Documents.Open("d:\inventor work\work\20x20cover.ipt", True)

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

Post to forums  

Autodesk Design & Make Report