Santa123
Mechanical
- Oct 2, 2006
- 80
Hello everyone,
When I try get an instance of Catia, I get an error "An unhandled exception of type 'System.InvalidOperationException' occurred in Catia_1.exe".
I added reference to all needed libraries. Could you give me some guidenlines.
Regards
Santa
When I try get an instance of Catia, I get an error "An unhandled exception of type 'System.InvalidOperationException' occurred in Catia_1.exe".
I added reference to all needed libraries. Could you give me some guidenlines.
Code:
Imports INFITF
Imports DRAFTINGITF
Public Class Form1
Public Shared Catia As Application = GetObject(vbNullString, "CATIA.Application")
Public Shared MyDrawing As DrawingDocument = Catia.ActiveDocument
Public Shared oSel As Selection = Catia.ActiveDocument.Selection
Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load
lblDrawingName.Text = MyDrawing.Name
End Sub
End Class
Regards
Santa