ArcGIS for Desktop

  • Documentation
  • Pricing
  • Support

  • My Profile
  • Help
  • Sign Out
ArcGIS for Desktop

ArcGIS Online

The mapping platform for your organization

ArcGIS for Desktop

A complete professional GIS

ArcGIS for Server

GIS in your enterprise

ArcGIS for Developers

Tools to build location-aware apps

ArcGIS Solutions

Free template maps and apps for your industry

ArcGIS Marketplace

Get apps and data for your organization

  • Documentation
  • Pricing
  • Support
Esri
  • Sign In
user
  • My Profile
  • Sign Out

Help

  • Home
  • Get Started
  • Map
  • Analyze
  • Manage Data
  • Tools
  • More...

Value

  • Summary
  • Properties
  • Code Sample

Summary

The value object is returned from GetParameterInfo when used in a script tool's ToolValidator class.

Properties

PropertyExplanationData Type
isEmpty
(Read Only)

Indicates if the value object is empty.

Boolean
value
(Read and Write)

Provides the value of the value object.

String

Code Sample

Value example

UpdateParameter populates a value list for the second parameter based on the attribute names of NetCDF file.

def updateParameters(self):
    """Modify the values and properties of parameters before internal
    validation is performed.  This method is called whenever a parameter
    has been changed."""

    # If the parameter has been altered, but not validated
    if self.params[0].altered and not self.params[0].hasBeenValidated:
        # Create a NetCDFFIleProperties object based on the input and
        #   use it to populate the value list of the sceond parameter.
        net_cdf = arcpy.NetCDFFileProperties(self.params[0].value.value)
        att_names = net_cdf.getAttributeNames()
        self.params[1].filter.list = att_names
        self.params[1].value = att_names[0]

    return

Related Topics

  • Setting script tool parameters
  • Filter
  • Parameter
  • Schema
  • Customizing script tool behavior
Feedback on this topic?

ArcGIS for Desktop

  • Home
  • Documentation
  • Pricing
  • Support

ArcGIS Platform

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

About Esri

  • About Us
  • Careers
  • Insiders Blog
  • User Conference
  • Developer Summit
Esri
© Copyright 2016 Environmental Systems Research Institute, Inc. | Privacy | Legal