ArcGIS Desktop

  • ArcGIS Pro
  • ArcMap

  • My Profile
  • Help
  • Sign Out
ArcGIS Desktop

ArcGIS Online

The mapping platform for your organization

ArcGIS Desktop

A complete professional GIS

ArcGIS Enterprise

GIS in your enterprise

ArcGIS 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
  • Support
Esri
  • Sign In
user
  • My Profile
  • Sign Out

ArcMap

  • Home
  • Get Started
  • Map
  • Analyze
  • Manage Data
  • Tools
  • Extensions

Calculate Default Values

  • Summary
  • Usage
  • Syntax
  • Code sample
  • Environments
  • Licensing information

Summary

Replaces null values in a feature class or table with the default values from the geodatabase feature class.

Usage

  • Only feature classes or tables that have default values specified will have null values replaced.

Syntax

arcpy.defense.CalculateDefaultValues(in_datasets)
ParameterExplanationData Type
in_datasets
[in_datasets,...]

The feature classes and/or tables whose null values will be replaced with the default values from the data model.

Dataset; Feature Layer; Table View

Derived Output

NameExplanationData Type
out_dataset

Output dataset where attributes were updated.

Table View; Feature Layer; Dataset

Code sample

CalculateDefaultValues (stand-alone script)

This stand-alone script calculates the default values for several feature classes in the VMap2TLM geodatabase.

# Name: CalculateDefaultValues_Example.py
# Description: Calculates default values on a feature dataset based on default data model values
# Requirements: ArcGIS Defense Mapping solution

# Import arcpy module
import arcpy

# Check out a DefenseMapping extension license
arcpy.CheckOutExtension("defense")

# Local variables
in_datasets = "C:\\Data\\Defense\\VMap2TLM.mdb\\VMap2TLM\\BridgeL;C:\\Data\\10.0\\Defense\\VMap2TLM.mdb\\VMap2TLM\\BuildA;C:\\Data\\10.0\\Defense\\VMap2TLM.mdb\\VMap2TLM\\BuildL;C:\\Data\\10.0\\Defense\\VMap2TLM.mdb\\VMap2TLM\\BuildP;C:\\Data\\10.0\\Defense\\VMap2TLM.mdb\\VMap2TLM\\BuiltupA"

# Execute Calculate Default Values function
arcpy.CalculateDefaultValues_defense(in_datasets)

# Check in the Defense Mapping extension
arcpy.CheckInExtension("defense")

Environments

This tool does not use any geoprocessing environments.

Licensing information

  • Basic: No
  • Standard: Requires Defense Mapping
  • Advanced: Requires Defense Mapping

Related topics

  • An overview of the Features toolset

ArcGIS Desktop

  • Home
  • Documentation
  • Support

ArcGIS

  • ArcGIS Online
  • ArcGIS Desktop
  • ArcGIS Enterprise
  • ArcGIS
  • ArcGIS Developer
  • ArcGIS Solutions
  • ArcGIS Marketplace

About Esri

  • About Us
  • Careers
  • Esri Blog
  • User Conference
  • Developer Summit
Esri
Tell us what you think.
Copyright © 2021 Esri. | Privacy | Legal