Add a 'BorrowProduct()' and 'BorrowExtension()' functions to arcpy

Idea created by johnmdye on Dec 29, 2013
    New
    Score60
    • enile
    • aewilson
    • johnmdye
    • olig
    • arigel
    • whiterd
    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

              
              BorrowProduct (arcpy)

              Summary

              Borrows a license of the given product from the License Server for the given number of days.

              Syntax

    BorrowProduct (product, {days_to_borrow})
                                  Parameter                               Explanation                               Data Type
                                  
                                       product
                             
                                  

                                       Product code for the product being set.

                                  
    •                                              arcview —ArcGIS for Desktop Basic product code
    •                                              arceditor —ArcGIS for Desktop Standard product code
    •                                              arcinfo —ArcGIS for Desktop Advanced product code
    •                                              engine —Engine Runtime product code
    •                                              enginegeodb —Engine Geodatabase Update product code
    •                                              arcserver — Server product code
                             
                                  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
    Code Sample
    BorrowProduct example

                        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)

              BorrowExtension (arcpy)

              Summary

              Borrows a license of the given extension from the License Server for the given number of days.

              Syntax

    BorrowExtension (extension_code, {days_to_borrow})
                                  Parameter                               Explanation                               Data Type
                                  
                                       extension_code
                             
                                  

                                       Keyword for the extension product that is being borrowed.

                                  
    •                                              3D —3D Analyst
    •                                              Schematics —ArcGIS Schematics
    •                                              ArcScan —ArcScan
    •                                              Business —Business Analyst
    •                                              DataInteroperability —Data Interoperability
    •                                              GeoStats —Geostatistical Analyst
    •                                              JTX — Workflow Manager
    •                                              Network —Network Analyst
    •                                              Aeronautical —Esri Aeronautical Solution
    •                                              Defense —Esri Defense Solution
    •                                              Foundation —Esri Production Mapping
    •                                              Datareviewer —ArcGIS Data Reviewer
    •                                              Nautical —Esri Nautical Solution
    •                                              Nauticalb —Esri Bathymetry
    •                                              Spatial —Spatial Analyst
    •                                              StreetMap —StreetMap
    •                                              Tracking —Tracking
                             
                                  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
    Code Sample
    BorrowExtension example

                        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)