1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33
|
Private Sub Form1_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
Dim prop As SolidEdgeFramework.Property
On Error Resume Next
' Determine si Solid Edge est en route
ObjApp = Nothing
ObjApp = GetObject(, "SolidEdge.Application")
If ObjApp Is Nothing Then
MessageBox.Show("Solidedge doit ètre ouvert avant l'éxécution de CartoucheSolidedge")
Me.Dispose()
Else
If ObjApp.ActiveDocumentType = 2 Then
TabControl.SelectedIndex = 1
TabControl.TabPages.Item(0).Enabled = False
TabControl.TabPages.Item(1).Enabled = True
TabControl.TabPages.Item(2).Enabled = False
Else
TabControl.SelectedIndex = 0
TabControl.TabPages.Item(0).Enabled = True
TabControl.TabPages.Item(1).Enabled = False
TabControl.TabPages.Item(2).Enabled = True
End If
End If
ObjDoc = ObjApp.ActiveDocument
'...
End Sub |
Partager