Hi All,
In Python toolbox, I'd like to check whether an user has 'Cartography' license. If yes, the tool continue to run and return to tool interface if not. How the snippet will like?
Thank you in advance.
In ArcGis Pro you can check the Product
ProductInfo—ArcPy Functions | ArcGIS Desktop
The listools doesn't indicate whether only licensed tools are listed.. so experiment
Listing tools, toolboxes, and environment settings—Geoprocessing and Python | ArcGIS Desktop
Which will dictate the licensing level
Cartography toolbox licensing—ArcGIS Pro | ArcGIS Desktop
There is the checkin/out option
Accessing licenses and extensions in Python—Geoprocessing and Python | ArcGIS Desktop
Yes, the licence should be checked in tool validation and no need to reinput the parameters.
Not clear on this part. If the tool isn't licensed, why would the parameters have to be reinput? Wouldn't you just report that it isn't going to happen? or are you looking at this for tool validation?
Thank you Dan. My problem can be partly solved by your indication that the tool license can be judged by CheckProduct(). But seems ListTools() give no difference even if a desktop has no a tool license, why?
Another question is how to return to my toolbox input interface if no a license rather than ending the tool with that I must reinput tool's parameters again.
Signed in members can post, follow updates, and more. New here? Register a free account.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.