Skip To Content

添加和配置运行 Pro GP 工具

“运行 Pro GP 工具”步骤用于在 ArcGIS Pro 中运行已配置地理处理工具、Python 脚本或 模型构建器 模型。

运行步骤时,作业切片上将显示启动图标 Starting。 工具启动时,将显示运行中图标 Running,表示工具在运行中。

如果使用 ArcGIS Arcade 表达式配置了任意步骤参数,则在工具开始运行之前,这些参数将转换为相应的值。

如果启用了在运行时可见选项,则地理处理窗格中将打开在步骤中配置的工具,用于在运行工具之前定义参数值。 如果已配置默认参数值,则这些值将在运行步骤时显示并且可以覆盖。 如果没有为步骤配置用户请求步骤帮助值,步骤将在运行时自动完成。

注:

如果从 ArcGIS Arcade 获取的参数值与工具不兼容,则步骤将失败。

When the step is run, the following actions can be performed:

  • 如果已启用在运行时可见选项,则可以提供参数值,然后可在地理处理窗格中单击运行运行步骤。
  • 可通过单击取消取消步骤。
    注:

    在某些情况下,可能无法在该步骤开始运行之后将其取消。

配置步骤

To configure the step, do the following:

  1. Create or edit a workflow diagram to access the Step Library panel.
  2. 运行 Pro GP 工具步骤库面板拖至工作流画布上步骤的连接箭头。

    The Step Details panel appears.

  3. Provide a name for the step in the Step Name text box.
  4. Optionally, add the message you want to appear when the step is run in the User Prompt text box.

    If the user prompt contains plain text and Arcade expressions, you'll need to format the text as follows:

    'This job is currently assigned to ' + JobOwner($Job) + '.'
    提示:

    Click the This input supports Arcade Expressions button This input supports Arcade expressions and choose an ArcGIS Arcade expression to add it to its associated text box.

  5. 选择要在参数部分中运行的工具的类型:
    • 系统工具箱 - ArcGIS Pro 随附的地理处理工具以及导入 ArcGIS Pro 工程的工具箱。
    • 其他工具箱 - 自定义地理处理工具和脚本
  6. 执行以下操作之一:

    系统工具箱中的工具

    工具箱别名文本框中,键入包含要运行工具的工具箱的工具箱别名。

    可在 ArcGIS Pro 文档的工具帮助页面上的 Python 选项卡中找到工具箱别名

    导入 ArcGIS Pro 工程的工具

    工具箱别名文本框中,键入包含要运行工具的工具箱的工具箱别名。

    目录窗格中右键单击工具箱,然后单击属性显示工具箱别名。

    自定义地理处理工具和脚本

    工具箱路径文本框中,输入工具箱的完整路径。 工具箱路径还可以引用在文件地理数据库或 企业级地理数据库 中存储的工具箱。 路径在 ArcGIS Pro 中必须可访问。

    You can also use ArcGIS Arcade expressions to provide a dynamic value.

  7. 工具名称文本框中,键入要运行的工具的名称。
    注:

    如果工具名称文本框中的地理处理工具的名称与 Arcade 函数的名称(例如 BufferClip)相匹配,则必须将工具名称括在单引号或双引号中,以免将其评估为 Arcade 表达式。

    可在 ArcGIS Pro 文档的工具帮助页面上的 Python 选项卡中找到工具名称

    You can also use ArcGIS Arcade expressions to provide a dynamic value.

  8. (可选)选中在运行时可见复选框允许在 ArcGIS Pro 中运行步骤时设置参数值。
  9. 单击添加新参数
  10. 参数名称文本框中输入参数的名称。

    可在 ArcGIS Pro 文档的地理处理工具帮助页面上的 Python 选项卡中找到工具参数名称

  11. (可选)单击显示默认值按钮 Show Default Value 定义运行步骤时的参数默认值。
    1. 选择以下选项之一:
      • - 提供静态值。
      • Arcade 表达式 - 使用 Arcade 表达式提供动态值
    2. Arcade 表达式文本框中提供属性的默认值。
  12. 重复步骤 9 到 11 添加更多参数。
  13. (可选)键入要在工具完成运行时用作输出值的派生输出参数的名称。

    可在 ArcGIS Pro 文档的工具帮助页面上的 Python 选项卡中找到工具派生输出参数

  14. (可选)选中附加 GP 日志复选框将工具历史记录另存为作业附件。
  15. (可选)在文件夹文本框中提供将存储日志的文件夹的名称。

    文件夹名称不能包含文件系统路径或特殊字符。 如果未提供文件夹名称,将自动创建名为 General 的文件夹。

    注:

    文件夹包含在工作流项目中,并且不是文件系统路径。

  16. Click the Options tab.
  17. Configure Step Options as necessary.
    • Manual—Run the step manually.
      • Optional—Allow the step to be finished without being run.
    • Automatic—Run the step as soon as it becomes active.
      注:

      If your workflow diagram is configured to automatically run a sequence of steps that includes the Evaluate Data Quality or the Run GP Service step, steps that attempt to run after the user token that started the sequence of steps expires will not run automatically. You must have a license for the ArcGIS Workflow Manager Server Advanced role to continue running the additional automated steps without manual intervention.

    • Run on a Schedule—Run the step according to a schedule you set.

      Learn more about scheduling options

  18. Optionally, provide help text for the step in the Step Help text box.

    You can also use ArcGIS Arcade expressions to provide a dynamic value for the step help. If the step help contains plain text and Arcade expressions, you'll need to format the text as follows:

    'For further assistance, please contact ' + JobCreator($Job) + '.'

  19. Optionally, click the Style tab to change the shape and color of the step.
  20. Optionally, click the About tab and provide a description for the step in the Step Description text box.
    注:

    The About tab also contains the step's ID that can be used with dynamic job properties to obtain a step's output.

Return value

When the step is completed, its return value is stored to indicate the result of the step. The return value can be immediately evaluated using paths to determine the next steps in the workflow. You can also retrieve the return value for completed steps throughout the workflow using ArcGIS Arcade expressions. The following table lists the step's return values:

Return valuesDescription

S000001

The step completed successfully.

F000001

The step failed to complete successfully.

输出值

When the step is completed, its output value is stored and can be used to determine the path the workflow follows or be used as inputs for other steps throughout the workflow. The following table shows the step's output value:

输出描述

<DerivedOutputParameterValue>

返回从工具接收的已配置派生输出值。

相关主题