So now that we can finally borrow licenses from the License Manager, there are methods in arcpy we can invoke to check for product availability and set the license level, but there doesn't seem to be a method to programmatically borrow the product licenses from the license server.
It would be great to see the below functionality added at 10.2
Borrows a license of the given product from the License Server for the given number of days.
Parameter | Explanation | Data Type |
product | Product code for the product being set.
| String |
days_to_borrow | The number of days to borrow the product license for. The default is the maximum number of days established by the license administrator. | Integer |
Borrows an ArcGIS for Desktop Basic product license using the arcview module.
import arcpy # Borrow an 'arcview' license from the License Server for 30 days arcpy.BorrowProduct("arcview", 30)
Borrows a license of the given extension from the License Server for the given number of days.
Parameter | Explanation | Data Type |
extension_code | Keyword for the extension product that is being borrowed.
| String |
days_to_borrow | The number of days to borrow the extension license for. The default is the maximum number of days established by the license administrator. | Integer |
Borrows an ArcGIS for Desktop Basic product license using the arcview module.
import arcpy # Borrow a 'spatial analyst' extension license from the License Server for 30 days arcpy.BorrowExtension("spatial", 30)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.