04-05-2022
05:51 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
04-05-2022
05:51 AM
Here is some VBA code to get you started. Just replace the text "AddInDisplayName" with the name DisplayName of the AddIn you want to work with. Or, if you know the Class ID of the AddIn, you can skip or delete the loop, and just use the other means (commented out) of identifying the AddIn you want to work with.
Sub ToggleAddIn()
Dim oAddIns As ApplicationAddIns
Set oAddIns = ThisApplication.ApplicationAddIns
Dim oAddIn As ApplicationAddIn
For Each oAddIn In oAddIns
If oAddIn.DisplayName = "AddInDisplayName" Then
If oAddIn.Activated Then
oAddIn.Deactivate
Else
oAddIn.Activate
End If
End If
Next
'Dim oMyAddIn As ApplicationAddIn
'Set oMyAddIn = oAddIns.ItemById("{.......}")
'oMyAddIn.Activate
End Sub
Wesley Crihfield
(Not an Autodesk Employee)