Outputting values instead of datasets is common. Output parameters containing value data types such as Long or Boolean are always Derived rather than Required.
This property defines whether the parameter is an input to the tool or an output of the tool. If the parameter type is Derived , the parameter direction will be automatically set to Output. All script tools should have output parameters so they can be used in ModelBuilder.
The fundamental idea of ModelBuilder is to connect the output of tools to inputs of other tools, and if your script tool doesn't have an output parameter, it isn't very useful in ModelBuilder.
The output might be a dataset that is entered in a parameter value, a derived output where the location or name is determined within the script, or a derived value that is calculated or determined. At the very least, you can output a Boolean containing true if the tool completed successfully, and false otherwise.
Parameters can be grouped into different categories to minimize the size of the Geoprocessing pane or to group related parameters that will be infrequently used. You can enter either a new category name or choose from a list if you have set a category for other parameters. Categories are always shown after noncategorized parameters. Do not put required parameters into categories, as they are hidden from view in the Geoprocessing pane.
If you want a parameter to be able to handle a list of values rather than just one value, set the MultiValue property to Yes.
An example of a multivalue control is illustrated below. Multivalues can be accessed as lists when using the arcpy. GetParameter function and iterated over using a for loop. Otherwise, multivalues can be accessed as a semicolon-delimited string using the arcpy. GetParameterAsText function. To break apart a delimited string, use the Python split method as shown in the code example below.
The default value will be the contents of the parameter when the script tool opened. It is also the value that will be used if a is entered for the parameter in scripting. If you don't specify a value for the Default property, the parameter value will be blank when the tool is opened. If you specify a value for this property, the Environment property will become disabled.
To enable the Environment property, clear the Default property. When the input parameter data type is a Feature Set or Record Set , you must specify the location of a schema that defines the fields and geometry type of the features to be entered. A schema is either a feature class, table, or layer file. The Feature Set and Record Set data types allow interactive input of data.
A Feature Set allows the user of your script to interactively create features by clicking the map. The Record Set allows your user to interactively create rows in a table grid. You can set the default value for a parameter to the value of an environment setting by right-clicking the appropriate cell under Environment and choosing the name of the environment setting. If you want only certain values or dataset types to be entered for a parameter, you can specify a filter.
Click the appropriate cell under Filter and choose the appropriate filter type from the drop-down list. A dialog box appears and you specify the values for the filter. Usually, there is only one filter type you can choose. You can also set filters programmatically with Python by customizing a script tool's ToolValidator class. For this filter, choose one or more filter values. Input feature classes will be checked against the filter values.
For example, if you select only Point as the filter value, the user can only enter point feature classes as the parameter value. A feature type filter defines the permissible feature class types: Point , Multipoint , Polygon , Polyline , Annotation , and Dimension. More than one value can be supplied to the filter. The file filter contains a list of file suffixes that a file may have, such as txt simple text file and csv comma-separated values. You can supply any text for a suffix—it doesn't have to be a suffix that ArcGIS recognizes.
The suffix can be of any length and does not include the dot. Multiple suffixes are separated by a semicolon delimiter. A Long or Double parameter can have a Range filter. This listing has ended. This amount is subject to change until you make payment. For additional information, see the Global Shipping Program terms and conditions - opens in a new window or tab This amount includes applicable customs duties, taxes, brokerage and other fees.
For additional information, see the Global Shipping Program terms and conditions - opens in a new window or tab. Estimated within business days Estimated delivery date help - opens a layer Estimated delivery dates - opens in a new window or tab include seller's handling time, origin ZIP Code, destination ZIP Code and time of acceptance and will depend on shipping service selected and receipt of cleared payment - opens in a new window or tab.
Delivery times may vary, especially during peak periods. Start of add to list layer. Sign in for more lists. Oct 20, PDT. Seller's other items. Please do not enter contact information. If you require a response, contact support.
Skip To Main Content. Safari Chrome Edge Firefox. Support Navigation Support. Close Window. For Windows 10 v. Each package includes drivers and software for all Windows versions.
Drivers for multiple adapters are included in each download package. Not every adapter is supported in each version of Windows.
0コメント