ArcGIS Desktop

  • ArcGIS Pro
  • ArcMap

  • My Profile
  • 帮助
  • Sign Out
ArcGIS Desktop

ArcGIS Online

专为贵组织打造的制图平台

ArcGIS Desktop

全面的专业性 GIS

ArcGIS Enterprise

面向企业的 GIS

ArcGIS for Developers

用于构建位置感知应用程序的工具

ArcGIS Solutions

适用于行业的免费模板地图和应用程序

ArcGIS Marketplace

获取适用于组织的应用程序和数据

  • 文档
  • 支持
Esri
  • 登录
user
  • 我的个人资料
  • 登出

帮助

  • 主页
  • 入门
  • 制图
  • 分析
  • 管理数据
  • 工具
  • 更多...

SetParameter

  • 摘要
  • 语法
  • 代码示例

摘要

用于使用对象按索引来设置指定参数属性。将对象从脚本传递到脚本工具时会用到此函数。如果您需要将文本值传递到脚本工具,请使用 SetParameterAsText。

语法

SetParameter (index, value)
参数说明数据类型
index

参数列表中指定参数的索引位置。

Integer
value

将设置指定参数属性的对象。

Object

代码示例

SetParameter 示例

将对象传递到指定工具参数。

import arcpy
# Get the input feature class name.
#
fc = arcpy.GetParameterAsText(0)
# Obtain the spatial reference object and return it to the tool.
SR = arcpy.Describe(fc).spatialReference
arcpy.SetParameter(1, SR)

相关主题

  • CopyParameter
  • GetArgumentCount
  • GetParameter
  • GetParameterAsText
  • GetParameterCount
  • GetParameterInfo
  • GetParameterValue
  • SetParameterAsText
  • 设置脚本工具参数

ArcGIS Desktop

  • 主页
  • 文档
  • 支持

ArcGIS 平台

  • ArcGIS Online
  • ArcGIS Desktop
  • ArcGIS Enterprise
  • ArcGIS for Developers
  • ArcGIS Solutions
  • ArcGIS Marketplace

关于 Esri

  • 关于我们
  • 招贤纳士
  • Esri 博客
  • 用户大会
  • 开发者峰会
Esri
分享您的想法。
Copyright © 2019 Esri. | 隐私政策 | 法律声明