SetProduct

サマリ

The SetProduct function defines the desktop license. SetProduct returns information on the license.

レガシレガシ:

arcpy をインポートする前に、該当する製品モジュール(arcinfo、arceditor、arcview、arcserver、arcenginegeodb、arcengine)をインポートして、製品レベルを設定する必要があります。SetProduct 関数はレガシー関数であり、arcpy がインポートされた後は製品を設定できなくなります。

説明

ヒントヒント:

製品とエクステンションの設定は、スタンドアロン スクリプト内でのみ必要です。Python ウィンドウからツールを実行する場合や、スクリプト ツールを使用する場合は、製品はアプリケーション内ですでに設定されており、アクティブなエクステンションは [エクステンション] ダイアログ ボックスに基づいて決められます。

構文

SetProduct (code)
パラメータ説明データ タイプ
code

Product code for the product being set.

  • arcview —ArcView product code.
  • arceditor —ArcEditor product code.
  • arcInfo —ArcInfo product code.
  • engine —Engine Runtime product code.
  • enginegeodb —Engine Geodatabase Update product code.
  • arcserver —Server product code.
String
リターン
データ タイプ説明
String

The function returns the status on the product license. There are four possible values:

  • CheckedOut —License successfully set.
  • AlreadyInitialized —License has already been set.
  • NotLicensed —The license is not valid or available.
  • Failed —A system failure occurred during the set request.

コードのサンプル

SetProduct example

Sets an ArcView product license using the arcview module.

# Set the ArcView 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)
 

関連項目


7/10/2012