Summary
Generates a license file (.sdlic) for displaying the contents in a licensed file geodatabase created by the Generate Licensed File Geodatabase tool. The license file must be installed using ArcGIS Administrator.
Usage
Once licensed, a file geodatabase’s contents cannot be displayed in ArcCatalog or ArcMap until you install the license file (.sdlic) using ArcGIS Administrator.
See Adding and removing ArcGIS data licenses for more information on installing the license file in ArcGIS Administrator.
The Allow export of Vector Data parameter determines if an end user can export vector data within the licensed file geodatabase.
The Expiration Date parameter defines an expiration date for the license file, after which the file geodatabase’s contents can no longer be displayed. This allows a set term for a licensed geodatabase. The default value is empty (blank), which means the data license file will never expire.
You cannot individually license a feature class or table to produce a mixed state where some feature classes or tables are licensed and others are not. However, a licensed file geodatabase allows you to add an unlicensed feature class or table through operations such as creating a new, empty feature class, copying and pasting, and importing.
Syntax
GenerateFgdbLicense_management (in_lic_def_file, out_lic_file, {allow_export}, {exp_date})
Parameter | Explanation | Data Type |
in_lic_def_file | The license definition file (.licdef) created by the Generate Licensed File Geodatabase tool. | File |
out_lic_file | The license file (.sdlic) for distribution. | File |
allow_export (Optional) | Indicates whether the export of vector data is allowed.
| String |
exp_date (Optional) | The expiration date of the data license file, after which the file geodatabase’s contents can no longer be displayed. The default value is empty (blank), which means the data license file will never expire. | Date |
Code sample
GenerateFgdbLicense example 1 (Python window)
The following example demonstrates how to use the GenerateFgdbLicense function in the Python window.
import arcpy
arcpy.env.workspace = "C:/data"
arcpy.GenerateFgdbLicense_management("london.licdef", "london.sdlic", "ALLOW_EXPORT", "2013-09-26 18:35:54")
GenerateFgdbLicense example 2 (stand-alone Python script)
The following example demonstrates how to use the GenerateFgdbLicense function in a stand-alone Python script.
# Name: GenerateFgdbLicense.py
# Description: Use the GenerateFgdbLicense tool to generate a license file (*.sdlic) for a protected file geodatabase.
# import system modules
import arcpy
# Set environment settings
arcpy.env.workspace = "C:/data"
# Set local variables
input_licdef = "london.licdef"
export = "DENY_EXPORT"
exp_date = "2013-09-26 18:35:54"
output_sdlic = "london.sdlic"
# Process: generate the license file
arcpy.GenerateFgdbLicense_management(input_licdef, output_sdlic, export, exp_date)
Environments
Licensing information
- ArcGIS Desktop Basic: No
- ArcGIS Desktop Standard: Yes
- ArcGIS Desktop Advanced: Yes