Automation of Inventor from Microsoft Access

Automation of Inventor from Microsoft Access

Anonymous
Not applicable
368 Views
1 Reply
Message 1 of 2

Automation of Inventor from Microsoft Access

Anonymous
Not applicable
I have a database with information about our drawings. I would like to have some code to open the Inventor .idw file from the database record, for example if the database record is for drawing number XXXX I want it to open Inventor and go to file XXXX.idw. I saw similar code for doing this from Excel but for some reason I'm getting an error with the .open part. I have Dim invDoc As DrawingDocument
Set invDoc = invApp.Documents.Open("'" & FullPath & "'"). I don't get a compile error, but when I run the code it tells me this is an invalid procedure call.
0 Likes
369 Views
1 Reply
Reply (1)
Message 2 of 2

Anonymous
Not applicable

You don't need the quotes around the
filename.  I'm assuming FullPath is a variable that you've declared and
assigned with the full path of the .idw file.  For example:

 

Dim FullPath As String

FullPath = "C:\Temp\" & NameFromDatabase &
".idw"

 

Dim invDoc As DrawingDocument

Set invDoc = invApp.Documents.Open(FullPath)


 
0 Likes