Message 1 of 5
VB.net open Inventor Document

Not applicable
11-30-2007
04:44 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I've a bunch of examples on the net on how to open and sketch from VBA for example:
'Open a document
Dim oDraw As DrawingDocument
Set oDraw = ThisApplication.Documents.Open("C:\Test\RD.ipt")
If oDraw.DocumentType kDrawingDocumentObject Then
MsgBox "This file is not a drawing file!", vbExclamation, "Alert"
End
End If
'Capture the current sheet
Dim oSheet As Sheet
Set oSheet = oDraw.ActiveSheet
I don't have the .ActiveSheet object when I try and reference my sheet from within VB.net. My overall goal is to access the parameters of the part-> change them with DB calls -> update the .dwg file from the .ipt file. If anybody has an ideas I would love to see them.
Thanks-
Jeff
Inventor 2008
Visual Studio 2005
'Open a document
Dim oDraw As DrawingDocument
Set oDraw = ThisApplication.Documents.Open("C:\Test\RD.ipt")
If oDraw.DocumentType kDrawingDocumentObject Then
MsgBox "This file is not a drawing file!", vbExclamation, "Alert"
End
End If
'Capture the current sheet
Dim oSheet As Sheet
Set oSheet = oDraw.ActiveSheet
I don't have the .ActiveSheet object when I try and reference my sheet from within VB.net. My overall goal is to access the parameters of the part-> change them with DB calls -> update the .dwg file from the .ipt file. If anybody has an ideas I would love to see them.
Thanks-
Jeff
Inventor 2008
Visual Studio 2005