SetProduct (arcpy)
サマリ
The SetProduct function defines the desktop license. SetProduct returns information on the license.
![レガシー レガシー](rsrc/legacy.png)
The product level should be set by importing the appropriate product module (arcinfo, arceditor, arcview, arcserver, arcenginegeodb, or arcengine) prior to importing arcpy. The SetProduct function is a legacy function and cannot set the product once arcpy has been imported.
For scripts using the arcgisscripting module, the equivalent SetProduct method is still supported.
説明
![ヒント ヒント](rsrc/tip.png)
製品とエクステンションの設定は、スタンドアロン スクリプト内でのみ必要です。Python ウィンドウからツールを実行する場合や、スクリプト ツールを使用する場合は、製品はアプリケーション内ですでに設定されており、アクティブなエクステンションは [エクステンション] ダイアログ ボックスに基づいて決められます。
構文
パラメータ | 説明 | データ タイプ |
product |
Product code for the product being set.
| String |
データ タイプ | 説明 |
String |
The function returns the status on the product license. There are four possible values:
|
コードのサンプル
Sets an ArcGIS for Desktop Basic product license using the arcview module.
# Set the ArcGIS for Desktop Basic product by importing the arcview module.
#
import arcview
import arcpy
arcpy.env.workspace = "C:/Data/SanDiego.gdb"
arcpy.CreateRasterDataset_management(arcpy.env.workspace,
"LandUse", "30", "8_BIT_UNSIGNED", "Freeways", 1)