Message 1 of 4
Open Method Behaviour
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi,
I am writing some code to convert a Parasolid .x_t file to an Inventor .ipt file.
I am using the following simplified code:
Private Sub Command0_Click()
Dim invApplication As Inventor.Application
Dim invDoc As Inventor.Document
On Error Resume Next
Set invApplication = GetObject(, "Inventor.Application")
If (Err) Then
Err.Clear
Set invApplication = CreateObject("Inventor.Application")
invApplication.Visible = True
End If
Set invDoc = invApplication.Documents.Open("\\a\b\Parasolid Files\A302262A.x_t", True)
Call invDoc.SaveAs("\\a\b\c\A302262A.ipt", True)
invApplication.Quit
Set invApplication = Nothing
End Sub
All I get is Inventor giving me an error "Failed to open document" yet when I manually open Inventor > Open and choose this file there are no problems; the file is opened and there are no warnings or errors.
It appears it is a problem with using VBA.
Does anyone have any ideas?
Thanks
