Any way to limit/force the use of only given (corporate) set of Inventor Add-Ins

Any way to limit/force the use of only given (corporate) set of Inventor Add-Ins

Maxim-CADman77
Advisor Advisor
191 Views
4 Replies
Message 1 of 5

Any way to limit/force the use of only given (corporate) set of Inventor Add-Ins

Maxim-CADman77
Advisor
Advisor

I'd like to know if there any bulletproof way to limit (and force) only given (corporate) set of Inventor Add-Ins for all users of Domain PCs:

1) Make impossible install/use of any non-coroprate Add-Ins (that are not in the list of corporate)

2) Guarantee to auto-start some corporate add-ins.

 

I believe both is impossible but would like to hear the opposite opinions/ideas.

Please vote for Inventor-Idea Text Search within Option Names

0 Likes
192 Views
4 Replies
Replies (4)
Message 2 of 5

ryan.rittenhouse
Advocate
Advocate

You're correct in that nothing is bulletproof with determined and/or incompetent users, but you can check to see what add-in's are running and change their state. We have an 'Autorun' rule that is built into our templates that (among other things) we use to check/set application settings and manage some add-ins. Below I've put the basic code we use to check for addins that we do and don't want running. Since we already have any opened file running this Autorun rule w/ an event trigger, it works well for us. You could also build it into an Add-In, but you'd still have to make sure your addin is installed and being run on every computer. We have the autorun rule phone home (just hits an API endpoint with the filename, user name, date/time) to make sure it's being run everywhere and run a heartbeat check on it to make sure all users have things reporting everyday they're in office. Again, this might take it outside the useful window for your application, but it's an option. Good luck!

 

Sub VerifyAddIns()
	
	Dim badAddIns As New List(Of String) From { "{48B682BC-42E6-4953-84C5-3D253B52E7AA}" } ' Bad Add-Ins
	Dim requiredAddIns As New List(Of String) From { "{48B682BC-42E6-4953-84C5-3D253B52E77B}" } ' Required Add-Ins
	
	For Each addIn As ApplicationAddIn In ThisApplication.ApplicationAddIns
		If addIn.Activated AndAlso badAddIns.Contains(addIn.ClientId) Then
			Logger.Info("Disabling AddIn " & addIn.DisplayName)
			addIn.LoadAutomatically = False
			addIn.Deactivate()
		ElseIf Not addIn.Activated AndAlso requiredAddIns.Contains(addIn.ClientId) Then
			Logger.Info("Enabling AddIn " & addIn.DisplayName)
			addIn.LoadAutomatically = True
			addIn.Activate
		End If
	Next addIn
	
End Sub 'VerifyAddIns
If this solved your problem, or answered your question, please click Accept Solution.
0 Likes
Message 3 of 5

cidhelp
Advocate
Advocate

Hello @Maxim-CADman77,

 

you can look at this XML:

C:\Program Files\Autodesk\Inventor 20XX\Preferences\AddInLoadRules.xml

There you can manage loading/blocking of AddIns in Inventor. Read the comments in the XML-file.

Message 4 of 5

Maxim-CADman77
Advisor
Advisor

Wow!
1) (block of non-corporate Add-Ins) seems like absolutely doable.

Thank you!
Don't you have any ideas on how to force corporate Add-Ins to auto-start with no user option to unload it?

Please vote for Inventor-Idea Text Search within Option Names

0 Likes
Message 5 of 5

jjstr8
Collaborator
Collaborator

You can put your addins in C:\Program Files\Autodesk\Inventor 20xx\Bin\Addins\  This will keep it away from non-admins. Add the following to your .addin files.

<Hidden>1</Hidden>
<LoadBehavior>0</LoadBehavior>
<UserUnloadable>0</UserUnloadable>

They must be hidden, otherwise the user can still uncheck "Load Automatically" which will create an override .addin file in the user's %appdata%\Autodesk\Inventor 20xx\Addins folder. Even with that in mind, an enterprising user can use iLogic or VBA to find the addin's ClassId and ClientId. With that information, they can create an override .addin file and make the addin visible or change its load behavior.

0 Likes