Update Diagrams (Schematics)

License Level:BasicStandardAdvanced


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.


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.



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

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

Schematic Dataset; Schematic Folder

The schematic builder update options. They are optional.

  • KEEP_MANUAL_MODIFDefault 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_MODIFUse it if you want the removed/reduced schematic features and reconnected schematic feature links to be restored after the update.
  • REFRESHUse 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_GUIDUse 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.
  • RECURSIVESearch recursively in subfolders.
  • NO_RECURSIVEDo not search recursively in subfolders.

The diagram template of the schematic diagram to update.


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


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"

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

    # Sets Schematics general settings
    in_schFolder2="Inside Plants"

    # 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

    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)


This tool does not use any geoprocessing environments

Related Topics

Licensing Information

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