Update Diagrams (Schematics)
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 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.
Verwendung
-
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
Parameter | Erläuterung | Datentyp |
in_container |
The schematic dataset or schematic folder in which the diagrams are stored. This container must already exist. | Schematic Diagram; Schematic Folder |
builder_options (optional) |
The schematic builder update options. They are optional.
| String |
recursive (optional) |
| 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
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.
# Name: UpdateDiagrams.py # Description: Update schematic diagrams # Author: ESRI # import system modules import arcpy msgNoLicenseAvailable = "Schematics license required" try: # Check out the ArcGIS Schematic extension license if arcpy.CheckExtension("Schematics") == "Available": arcpy.CheckOutExtension("Schematics") else: raise Exception(msgNoLicenseAvailable) # Set environnement settings arcpy.OverWriteOutput = True arcpy.env.workspace = "C:\ArcGIS\ArcTutor\Schematics\Schematics_In_ArcMap\ElecDemo.gdb" #Process: UpdateDiagrams on the specified Feeders schematic folder arcpy.UpdateDiagrams_schematics("ElecDemo\Feeders") #Process: UpdateDiagrams on the specified GeoSchematic diagram template arcpy.UpdateDiagrams_schematics("ElecDemo", "#", "RECURSIVE", "GeoSchematic") #Process: UpdateDiagrams on a specified Inside Plants schematic folder for diagrams that have not been updated for 7 days only arcpy.UpdateDiagrams_schematics("ElecDemo\Inside Plants", "#", "RECURSIVE", "#", "7") # Returns the schematic license arcpy.CheckInExtension("Schematics") except Exception as exc: print exc