AddToolbox

サマリ

Accesses the specified toolbox, either by specifying its path or referencing its alias. AddToolbox adds the specified toolbox to the current geoprocessing session, allowing for access to any and all of the toolbox's tools.

注意注意:
AddToolbox will only allow the tool to be used via the geoprocessor object; arcpy users should use the ImportToolbox method instead.

構文

AddToolbox (toolbox)
パラメータ説明データ タイプ
toolbox

The name, including path, or alias, of the toolbox to be added to the current geoprocessing session. Place the name/path, or alias, string inside double quotes.

Server toolboxes can also be added using a semicolon delimiter.

The name, including path, or alias, of the toolbox to be added to the current geoprocessing session. Place the name/path, or alias, string inside double quotes. Server toolboxes can also be added using a semicolon delimiter.

  • Syntax for Internet ArcGIS Server
    • URL;servername;{username};{password}
  • Syntax for Local ArcGIS Server
    • machinename;servername.

  • Syntax for Internet ArcGIS Server
    • URL;servername;{username};{password}
  • Syntax for Local ArcGIS Server
    • machinename;servername.
String

コードのサンプル

AddToolbox example 1

Add the specified toolbox to the current geoprocessing session.

import arcpy

# Add a toolbox to a session
#
arcpy.AddToolbox("c:/mytoolboxes/operations.tbx")
arcpy.gp.CustomTool()

関連項目


7/10/2012