Update Diagrams (Schematics)

Resumen

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.

PrecauciónPrecaución:

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.

Uso

Sintaxis

UpdateDiagrams_schematics (in_container, {builder_options}, {recursive}, {diagram_type}, {last_update_criteria})
ParámetroExplicaciónTipo de datos
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
(Opcional)

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 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 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
(Opcional)
  • RECURSIVESearch recursively in subfolders.
  • NO_RECURSIVEDo not search recursively in subfolders.
Boolean
diagram_type
[diagram_type,...]
(Opcional)

The diagram template of the schematic diagram to update.

String
last_update_criteria
(Opcional)

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

Long

Ejemplo de código

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

Entornos

Esta herramienta no utiliza ningún entorno de geoprocesamiento

Temas relacionados

Información de licencia

ArcView: Requiere Schematics
ArcEditor: Requiere Schematics
ArcInfo: Requiere Schematics

7/11/2012