-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathAddinGlobal.vb
More file actions
33 lines (28 loc) · 974 Bytes
/
AddinGlobal.vb
File metadata and controls
33 lines (28 loc) · 974 Bytes
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
Imports System.Collections.Generic
Imports System.Runtime.InteropServices
Imports Inventor
'Namespace InventorNetAddinVB1
Public Class AddinGlobal
Public Shared IVApp As Inventor.Application
Public Shared RibbonPanelId As String
Public Shared RibbonPanel As RibbonPanel
Public Shared ButtonList As New List(Of InventorButton)()
Private Shared mClassId As String
Public Shared Property ClassId() As String
Get
If Not String.IsNullOrEmpty(mClassId) Then
Return AddinGlobal.mClassId
Else
Throw New System.Exception("The addin server class id hasn't been gotten yet!")
End If
End Get
Set(value As String)
AddinGlobal.mClassId = value
End Set
End Property
Public Shared Sub GetAddinClassId(t As Type)
Dim guidAtt As GuidAttribute = DirectCast(GuidAttribute.GetCustomAttribute(t, GetType(GuidAttribute)), GuidAttribute)
mClassId = "{" & guidAtt.Value & "}"
End Sub
End Class
'End Namespace