About Cartography license checking

639
4
Jump to solution
05-06-2019 12:11 AM
TieshengWu
Occasional Contributor

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.

0 Kudos
1 Solution

Accepted Solutions
DanPatterson_Retired
MVP Esteemed Contributor
4 Replies
DanPatterson_Retired
MVP Esteemed Contributor

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 

TieshengWu
Occasional Contributor

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.

0 Kudos
DanPatterson_Retired
MVP Esteemed Contributor

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?

TieshengWu
Occasional Contributor

Yes, the licence should be checked in tool validation and no need to reinput the parameters. 

0 Kudos