Update Diagrams (Schematics)

Lizenzstufe:BasicStandardAdvanced

Zusammenfassung

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.

AchtungAchtung:

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.

Verwendung

Syntax

UpdateDiagrams_schematics (in_container, {builder_options}, {recursive}, {diagram_type}, {last_update_criteria})
ParameterErläuterungDatentyp
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_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.
  • 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.
String
recursive
(optional)
  • RECURSIVESearch recursively in subfolders.
  • NO_RECURSIVEDo 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

Codebeispiel

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: Erweiterung "ArcGIS Schematics"

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

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

    # Sets environnement settings
    arcpy.env.overwriteOutput = True
    arcpy.env.workspace = "C:\ArcGIS\ArcTutor\Schematics\Schematics_In_ArcMap\ElecDemo.gdb"

    # Updates diagrams stored on a specified schematic folder. For example, diagrams in the Feeders schematic folder
    arcpy.UpdateDiagrams_schematics("ElecDemo\Feeders")

    # Updates diagrams based on a specified diagram template. For example, diagrams based on the GeoSchematic diagram template
    arcpy.UpdateDiagrams_schematics("ElecDemo", "#", "RECURSIVE", "GeoSchematic")

    # Updates diagrams stored on a specified schematic folder that have not been updated for N days. For example, diagrams stored in the Inside_Plants schematic folder not updated for 7 days
    arcpy.UpdateDiagrams_schematics("ElecDemo\Inside Plants", "#", "RECURSIVE", "#", "7")

    # Returns the Erweiterung "ArcGIS Schematics" 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)

Umgebung

Dieses Werkzeug verwendet keine Geoverarbeitungsumgebungen.

Verwandte Themen

Lizenzierungsinformationen

ArcGIS for Desktop Basic: Erfordert Schematics
ArcGIS for Desktop Standard: Erfordert Schematics
ArcGIS for Desktop Advanced: Erfordert Schematics
9/11/2013