ArcGIS Desktop

  • ArcGIS Pro
  • ArcMap

  • My Profile
  • Ayuda
  • Sign Out
ArcGIS Desktop

ArcGIS Online

La plataforma de representación cartográfica para tu organización

ArcGIS Desktop

Un completo SIG profesional

ArcGIS Enterprise

SIG en tu empresa

ArcGIS Developers

Herramientas para crear aplicaciones basadas en la ubicación

ArcGIS Solutions

Plantillas de aplicaciones y mapas gratuitas para tu sector

ArcGIS Marketplace

Obtén aplicaciones y datos para tu organización.

  • Documentación
  • Soporte
Esri
  • Iniciar sesión
user
  • Mi perfil
  • Cerrar sesión

ArcMap

  • Inicio
  • Introducción
  • Cartografiar
  • Analizar
  • Administrar datos
  • Herramientas
  • Extensiones

Update Diagrams

  • Resumen
  • Uso
  • Sintaxis
  • Muestra de código
  • Entornos
  • Información de licenciamiento

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—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.

Precaució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

  • 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.

Sintaxis

arcpy.schematics.UpdateDiagrams(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 Dataset; Schematic Folder
builder_options
(Opcional)

The schematic builder update options. They are optional.

  • KEEP_MANUAL_MODIF —Default 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_MODIF —Use it if you want the removed/reduced schematic features and reconnected schematic feature links to be restored after the update.
  • REFRESH —Use 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_GUID —Use 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
(Opcional)
  • RECURSIVE —Search recursively in subfolders.
  • NO_RECURSIVE —Do not search recursively in subfolders.
Boolean
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

Muestra de código

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"

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

    # Sets Schematics general settings
    dataLocation="C:/ArcGIS/ArcTutor/Schematics/Schematics_In_ArcMap"
    gdbName="ElecDemo.gdb"
    in_schDataset="ElecDemo"
    in_schFolder1="Feeders"
    in_schFolder2="Inside Plants"
    in_diagTempName="GeoSchematic"
    recOption1="RECURSIVE"
    recOption2="NO_RECURSIVE"
    nbDays="7"

    # 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
    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)

Entornos

Esta herramienta no utiliza ningún entorno de geoprocesamiento.

Información de licenciamiento

  • Basic: Requiere Schematics
  • Standard: Requiere Schematics
  • Advanced: Requiere Schematics

Temas relacionados

  • An overview of the Schematics toolbox
  • Update Diagram
  • Create Diagram
  • Create Schematic Folder
  • Convert Diagram To Features

ArcGIS Desktop

  • Inicio
  • Documentación
  • Soporte

ArcGIS

  • ArcGIS Online
  • ArcGIS Desktop
  • ArcGIS Enterprise
  • ArcGIS
  • ArcGIS Developer
  • ArcGIS Solutions
  • ArcGIS Marketplace

Acerca de Esri

  • Quiénes somos
  • Empleo
  • Blog de Esri
  • Conferencia de usuarios
  • Cumbre de desarrolladores
Esri
Díganos su opinión.
Copyright © 2021 Esri. | Privacidad | Legal