Update Diagrams (Schematics)
Récapitulatif
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.
![Attention Attention](rsrc/caution.png)
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.
Utilisation
-
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.
Syntaxe
Paramètre | Explication | Type de données |
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 (Facultatif) |
The schematic builder update options. They are optional.
| String |
recursive (Facultatif) |
| Boolean |
diagram_type [diagram_type,...] (Facultatif) |
The diagram template of the schematic diagram to update. | String |
last_update_criteria (Facultatif) |
The number of days between diagram updates. The default is zero (0), meaning all diagrams will be updated daily. | Long |
Exemple de code
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