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...

Update Diagrams

  • Summary
  • Usage
  • Syntax
  • Code Sample
  • Environments
  • Licensing Information

Summary

Updates schematic diagrams stored in a schematic dataset or schematic folder.

All diagrams or a subset of diagrams (for example, diagrams related to a specific diagram template or diagrams that have not been updated for a particular number of days) can be updated.

Only diagrams based on the Standard builder—that is, diagrams built from features organized into a geometric network or network dataset and schematic diagrams built from custom queries—can be updated using this geoprocessing tool. Diagrams based on the Network Dataset builder and XML builder that require specific input data cannot be updated using this tool.

Caution:

If a diagram based on the XML or Network Dataset builder is detected during the execution, an error is displayed, and the process is stopped.

Usage

  • This tool is mostly used to batch diagram updates. But, when user data has been dropped and reloaded since the diagram generations, it can also be used to resynchronize the schematic features with their related features/objects based on GUIDs.

  • If the Diagram Template parameter is specified, only the diagrams based on that template will be updated.

  • If the Number of days without update parameter is specified, only the diagrams for which the last update date meets the criterion will be updated.

  • By default, when the value specified for Input Schematic Container is a schematic folder, the update process operates recursively on all diagrams contained in that schematic folder and on all those contained in its subfolders. If you do not want the diagrams contained in the subfolders to be updated, set 0 for the recursive parameter.

Syntax

UpdateDiagrams_schematics (in_container, {builder_options}, {recursive}, {diagram_type}, {last_update_criteria})
ParameterExplanationData Type
in_container

The schematic dataset or schematic folder in which the diagrams are stored. This container must already exist.

Schematic Dataset; Schematic Folder
builder_options
(Optional)

The schematic builder update options. They are optional.

  • KEEP_MANUAL_MODIF —Default option. Use it if you want the schematic features that have been removed/reduced from the diagram not to reappear and the edited connections to be kept in the updated diagram. This is the default.
  • NO_KEEP_MANUAL_MODIF —Use it if you want the removed/reduced schematic features and reconnected schematic feature links to be restored after the update.
  • REFRESH —Use it to simply refresh the attributes for all schematic features in the input diagram to the current state of the related network features in the geometric network or network dataset feature classes.
  • RESYNC_FROM_GUID —Use this particular option if you want to resynchronize the schematic related network feature/object information based on GUIDs. This option must be used to avoid errors or data corruption when diagrams are updated while user data has been dropped and reloaded since their generations. Note that when using this option, the process works on the GUIDs to try to reattach the schematic features in the diagrams to their expected related network features/objects, but the diagram contents are not updated when the process ends. Once the reattachment is done, the real update can be launched.
String
recursive
(Optional)
  • RECURSIVE —Search recursively in subfolders.
  • NO_RECURSIVE —Do not search recursively in subfolders.
Boolean
diagram_type
[diagram_type,...]
(Optional)

The diagram template of the schematic diagram to update.

String
last_update_criteria
(Optional)

The number of days between diagram updates. The default is zero (0), meaning all diagrams will be updated daily.

Long

Code Sample

UpdateDiagrams - Example (Stand-alone Python script)

Update schematic diagrams contained in a specified schematic folder, implemented by a particular diagram template, or that have not been updated for a specified number of days.How to run this Python script example:

  1. Start ArcCatalog or ArcMap with a new empty map.
  2. Copy and paste the following script in the Python window.
  3. Press ENTER.

# Name: UpdateDiagrams.py
# Description: Update schematic diagrams
# Requirement: ArcGIS Schematics extension

# import system modules
import arcpy
msgNoLicenseAvailable = "ArcGIS Schematics extension license required"

try:
    # Checks out the ArcGIS Schematics extension license
    if arcpy.CheckExtension("Schematics") == "Available":
        arcpy.CheckOutExtension("Schematics")
    else:
        raise Exception(msgNoLicenseAvailable)

    # Sets Schematics general settings
    dataLocation="C:/ArcGIS/ArcTutor/Schematics/Schematics_In_ArcMap"
    gdbName="ElecDemo.gdb"
    in_schDataset="ElecDemo"
    in_schFolder1="Feeders"
    in_schFolder2="Inside Plants"
    in_diagTempName="GeoSchematic"
    recOption1="RECURSIVE"
    recOption2="NO_RECURSIVE"
    nbDays="7"

    # Sets environnement settings
    arcpy.env.overwriteOutput = True
    arcpy.env.workspace = dataLocation + "/" + gdbName

    # Updates diagrams stored on a specified schematic folder;
    arcpy.UpdateDiagrams_schematics(in_schDataset + "/" + in_schFolder1)

    # Updates diagrams based on a specified diagram template.
    arcpy.UpdateDiagrams_schematics(in_schDataset, "#", recOption1, in_diagTempName)

    # Updates diagrams stored on a specified schematic folder that have not been updated for N days.
    arcpy.UpdateDiagrams_schematics(in_schDataset + "/" + in_schFolder2, "#", recOption1, "#", nbDays)

    # Returns the ArcGIS Schematics extension license
    arcpy.CheckInExtension("Schematics")

    print "Script completed successfully"

except Exception as e:
    # If an error occurred, print line number and error message
    import traceback, sys
    tb = sys.exc_info()[2]
    print "An error occured on line %i" % tb.tb_lineno
    print str(e)

Environments

This tool does not use any geoprocessing environments

Licensing Information

  • ArcGIS for Desktop Basic: Requires Schematics
  • ArcGIS for Desktop Standard: Requires Schematics
  • ArcGIS for Desktop Advanced: Requires Schematics

Related Topics

  • An overview of the Schematics toolbox
  • Update Diagram
  • Create Diagram
  • Create Schematic Folder
  • Convert Diagram To Features
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