How to change ArcGIS Desktop product level license with arcpy?

1358
4
10-26-2020 11:39 AM
JohnWaterman
New Contributor III

I need to change product level in python scripts to help ensure users do not hold on to advanced (arcInfo) licenses.

It appears easy to check in/out extensions: arcpy.CheckInExtension("3D")

How do I set a users license from ArcInfo (equivalent to an ArcGIS Desktop Advanced license) to ArcView (equivalent to an ArcGIS Desktop Basic license)?

Thank you!

0 Kudos
4 Replies
DanPatterson
MVP Esteemed Contributor

Does arcmap's arcpy have a....

CheckProduct—ArcGIS Pro | Documentation 

method?  (This is for Pro, so you will have to check your docs)


... sort of retired...
0 Kudos
JoshuaBixby
MVP Esteemed Contributor

SetProduct—ArcMap | Documentation .  Note, there are some very specific steps to using this function.

In general, the user's current license is used when ArcPy is imported, so I don't understand why you would be wanting to set the license from Advanced to Basic.  Or, are you wanting to change the license for the local installation of ArcGIS Desktop?

JohnWaterman
New Contributor III

Some very lazy people are holding onto Advanced licenses.  I need an automated way to check these back in so others can use the Advanced licenses.  

0 Kudos
JohnWaterman
New Contributor III
Legacy:

The product level should be set by importing the appropriate product module (arcinfo, arceditor, arcview, arcserver, arcenginegeodb, or arcengine) prior to importing arcpy. The SetProduct function is a legacy function and cannot set the product once arcpy has been imported.

For scripts using the arcgisscripting module, the equivalent SetProduct method is still supported.

0 Kudos