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 for 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 Diagram

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

Resumen

Updates a schematic diagram.

Depending on the schematic builder, the diagram update can be based on feature layers, feature classes, object tables, a solved network analysis, or an XML file.

Uso

  • The Input Data parameter is mandatory for diagrams working with the Network Dataset builder and XML builder. It is optional for diagrams working with the Standard builder when it is configured to operate from a geometric network or network dataset. It must not be specified for diagrams that work with the Standard builder when it is configured to operate from custom queries.

  • When using the Update Diagram tool on diagrams implemented by the Standard builder that have been generated from a geometric network trace, the update operates from the updated trace result based on the trace parameters that persisted in the schematic dataset the first time the diagram was generated from a highlighted trace.

  • When the update must operate from features that compose a geometric network or network dataset, it is not necessary to specify all the feature layers in the Input Data parameter. If the Add connected nodes option is specified for the Standard builder properties, only the feature layers related to edge features or edge network elements can be specified, even if all the feature layers related to the geometric network or network dataset (junctions and edges) will be used for update.

  • If a particular layout was saved for the specified schematic diagram, the schematic features that were in the diagram before updating are displayed according to their last saved position, and new schematic features that may have been introduced during the update are positioned at their geographic coordinates.

Sintaxis

UpdateDiagram(in_diagram, {in_data}, {builder_options})
ParámetroExplicaciónTipo de datos
in_diagram

The schematic diagram layer to be updated.

Schematic Layer
in_data
[in_data,...]
(Opcional)

The input data on which the diagram update will be based.

The Input Data parameter is not required for all predefined builders; it's an optional parameter:

  • For diagram templates that work with the Standard builder configured to operate from custom queries, no input tables must be set.
  • For diagram templates that work with the XML builder, the Input Data parameter must reference an XML file.
  • For diagram templates that work with the Network Dataset builder, the input data must be specified. It must reference a unique network analysis layer. If the related network analysis is not performed, Schematics tries to perform it before using the solved analysis layer as input.
  • For diagram templates that work with the Standard builder configured to operate from a geometric network or a network dataset, when the Input Data parameter is not specified, the Update Diagram tool works from the initial set of network features/objects used to generate the diagram or from the updated geometric network trace result based on the trace parameters that persisted in the schematic database if the diagram was generated from a highlighted trace. When the Input Data parameter is specified, it must reference at least a feature layer, feature class, or object table so the update operates on this data according to the Builder Options value.

Table View;Data Element;Layer
builder_options
(Opcional)

The schematic builder update options. Update options are optional. They depend on the builder related to the diagram template that implements the specified schematic diagram:

  • Diagrams generated from custom queries (Standard builder): KEEP_MANUAL_MODIF, NO_KEEP_MANUAL_MODIF, or REFRESH.
  • Diagrams generated from XML data (XML builder): KEEP_MANUAL_MODIF or NO_KEEP_MANUAL_MODIF.
  • Diagrams generated from solver results on network datasets (Network Dataset builder): NO_MERGE_NODES;KEEP_MANUAL_MODIF, NO_MERGE_NODES;NO_KEEP_MANUAL_MODIF, MERGE_NODES;KEEP_MANUAL_MODIF or MERGE_NODES;NO_KEEP_MANUAL_MODIF.
  • Diagrams generated from features organized into a geometric network or a network dataset (Standard builder):
    • When the Input Data parameter is not specified—KEEP_MANUAL_MODIF, NO_KEEP_MANUAL_MODIF, or REFRESH
    • When the Input Data parameter is specified—REBUILD;KEEP_MANUAL_MODIF, REBUILD;NO_KEEP_MANUAL_MODIF, APPEND;KEEP_MANUAL_MODIF, APPEND;NO_KEEP_MANUAL_MODIF, APPEND_QUICK;KEEP_MANUAL_MODIF or APPEND_QUICK;NO_KEEP_MANUAL_MODIF

  • KEEP_MANUAL_MODIF —Default option for diagram based on the XML builder or on the Standard builder when no input data is set. Use it to synchronize the input diagram content either against the original selection/trace/query used to initially generate this diagram—Standard diagram—or from an updated version of the XML input data initially used to generate it—XML diagram—whereas the schematic features that may have been manually removed/reduced/reconnected are kept in the updated diagram.
  • NO_KEEP_MANUAL_MODIF —Option available for diagrams based on the XML builder or on the Standard builder when no input data is set. Use it to synchronize the input diagram content either against the original selection/trace/query used to initially generate this diagram—Standard diagram—or from an updated version of the XML input data initially used to generate it—XML diagram—whereas the schematic features that may have been manually removed/reduced/reconnected are restored in the updated diagram.
  • REFRESH —Option available for diagrams based on the Standard builder when no input data is set. 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.
  • REBUILD;KEEP_MANUAL_MODIF —Default option available for diagrams based on the Standard builder when input data is set. Use this option if you want the input diagram to be completely rebuilt according to the specified input feature layers, feature classes, or object tables, whereas the schematic features that may have been manually removed/reduced/reconnected are kept in the updated diagram.
  • REBUILD;NO_KEEP_MANUAL_MODIF —Option available for diagrams based on the Standard builder when input data is set. Use this option if you want the input diagram to be completely rebuilt according to the specified input feature layers, feature classes, or object tables, whereas the schematic features that may have been manually removed/reduced/reconnected are restored in the updated diagram.
  • APPEND;KEEP_MANUAL_MODIF —Option available for diagrams based on the Standard builder when input data is set. Use this option if you want to append schematic features associated with the specified input feature layers, feature classes, or object tables with a full synchronization of the input diagram content, whereas the schematic features that may have been manually removed/reduced/reconnected are kept in the updated diagram.
  • APPEND;NO_KEEP_MANUAL_MODIF —Option available for diagrams based on the Standard builder when input data is set. Use this option if you want to append schematic features associated with the specified input feature layers, feature classes, or object tables with a full synchronization of the input diagram content, whereas the schematic features that may have been manually removed/reduced/reconnected are restored in the updated diagram.
  • APPEND_QUICK;KEEP_MANUAL_MODIF —Option available for diagrams based on the Standard builder when input data is set. Use this option if you want to append schematic features associated with the specified input feature layers, feature classes, or object tables with a partial synchronization of the input diagram content, whereas the schematic features that may have been manually removed/reduced/reconnected are kept in the updated diagram.
  • APPEND_QUICK;NO_KEEP_MANUAL_MODIF —Option available for diagrams based on the Standard builder when input data is set. Use this option if you want to append schematic features associated with the specified input feature layers, feature classes, or object tables with a partial synchronization of the input diagram content, whereas the schematic features that may have been manually removed/reduced/reconnected are restored in the updated diagram.
  • NO_MERGE_NODES;KEEP_MANUAL_MODIF —Default option for diagrams based on the Network Dataset builder. Use this option to update the input diagram from the specified solved network analysis layer without merging nodes that occur several times in this layer, whereas the schematic features that may have been manually removed/reduced/reconnected are kept in the updated diagram.
  • NO_MERGE_NODES;NO_KEEP_MANUAL_MODIF —Option available for diagrams based on the Network Dataset builder. Use this option to update the input diagram from the specified solved network analysis layer without merging nodes that occur several times in this layer, whereas the schematic features that may have been manually removed/reduced/reconnected are restored in the updated diagram.
  • MERGE_NODES;KEEP_MANUAL_MODIF —Option available for diagrams based on the Network Dataset builder. Use it to update the input diagram from the specified solved network analysis layer and merge nodes that occur several times in this layer, whereas the schematic features that may have been manually removed/reduced/reconnected are kept in the updated diagram.
  • MERGE_NODES;NO_KEEP_MANUAL_MODIF —Option available for diagrams based on the Network Dataset builder. Use it to update the input diagram from the specified solved network analysis layer and merge nodes that occur several times in this layer, whereas the schematic features that may have been manually removed/reduced/reconnected are restored in the updated diagram.
String

Muestra de código

UpdateDiagram and Standard builder working from custom queries example 1 (stand-alone Python script)

Updates a sample schematic diagram entirely built from custom queries. In this case, only the diagram name parameter is required.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: UpdateDiagramCustomQuery.py
# Description: Update a schematic diagram entirely built from custom queries
# Requirement: Extensión ArcGIS Schematics

# import system modules
import arcpy
msgNoLicenseAvailable = "Extensión ArcGIS Schematics license required"

try:
    # Checks out the Extensión ArcGIS Schematics 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_schFolder="Inside Plants"
    in_diagName="Substation 08"
    builder_option1="REFRESH"

    # Sets environment settings
    arcpy.env.overwriteOutput = True
    arcpy.env.workspace = dataLocation + "/" + gdbName

    # UpdateDiagram by only refreshing attributes on the input diagram's schematic features 
    arcpy.UpdateDiagram_schematics(in_schDataset + "/" + in_schFolder + "/" + in_diagName, "#", builder_option1)

    # UpdateDiagram by fully synchronizing the input custom queries-based diagram (no parameters required)
    arcpy.UpdateDiagram_schematics(in_schDataset + "/" + in_schFolder + "/" + in_diagName)

    # Returns the Extensión 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 occurred on line %i" % tb.tb_lineno
    print str(e)
UpdateDiagram and Standard builder working on geometric network data example 2 (stand-alone Python script)

Updates sample schematic diagrams built from features organized into a geometric network.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: UpdateDiagramStd.py
# Description: Update schematic diagrams built from features organized into a geometric network
# Requirement: Extensión ArcGIS Schematics

# import system modules
import arcpy
msgNoLicenseAvailable = "Extensión ArcGIS Schematics license required"

try:
    # Checks out the Extensión ArcGIS Schematics 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_schFolder="Feeders"
    in_diagTempName="GeoSchematic"
    # Sets variables used for the A/ UpdateDiagram sample
    in_diagAName="Feeder 0801-Rice Creek"
    # Sets variables used for the B/ UpdateDiagram sample
    in_diagBName="Feeder 0802-Goldmine"
    # Sets variables used for the C/ UpdateDiagram sample
    in_diagCName="WholeElectricNetworkDiagram"
    input_ForCDiag="ElectricNetwork/PrimaryLine;ElectricNetwork/SecondaryLine"    
    input_FC1="ElectricNetwork/PrimaryLine"
    # Sets variables used for the D/ UpdateDiagram sample
    in_diagDName="FeederDiagram"
    input_ForDDiag="ElectricNetwork/Feeder"
    input_FC2="ElectricNetwork/Substation"
    # Sets variables used for the E/ UpdateDiagram sample
    in_diagEName="FeederDiagramBIS"
    input_ForEDiag="ElectricNetwork/Feeder"
    input_FC3="ElectricNetwork/ServiceLocation"
    # Sets variables used for the F/ UpdateDiagram sample
    input_LayerName="PrimaryLineLayer"
    input_Filter="PHASECODE=135"    
    in_diagFName="PrimaryLinesDiagram"

    # Sets  builder_options variables for diagram Update
    # - For simply refreshing the diagram's attributes only
    U_option1="REFRESH"
    # - For rebuilding the diagram from a different input
    U_option2="REBUILD;KEEP_MANUAL_MODIF"
    U_option2BIS="REBUILD;NO_KEEP_MANUAL_MODIF"
    # - For appending new features to the diagram with a partial synchronization of its content
    U_option3="APPEND_QUICK;KEEP_MANUAL_MODIF"
    U_option3BIS="APPEND_QUICK;NO_KEEP_MANUAL_MODIF"
    # - For appending new features to the diagram with a full synchronization of its content
    U_option4="APPEND;KEEP_MANUAL_MODIF"
    U_option4BIS="APPEND;NO_KEEP_MANUAL_MODIF"

    # Sets environment settings
    arcpy.env.overwriteOutput = True
    arcpy.env.workspace = dataLocation + "/" + gdbName

    # Creates some new diagrams that will be used to exemplify the C/, D/, E/ and F/ UpdateDiagram samples
    arcpy.CreateDiagram_schematics(in_schDataset, in_diagCName, in_diagTempName, input_ForCDiag)
    arcpy.CreateDiagram_schematics(in_schDataset, in_diagDName, in_diagTempName, input_ForDDiag)
    arcpy.CreateDiagram_schematics(in_schDataset, in_diagEName, in_diagTempName, input_ForEDiag)
    InputLayer = arcpy.MakeFeatureLayer_management(input_FC1, input_LayerName, input_Filter)
    arcpy.CreateDiagram_schematics(in_schDataset, in_diagFName, in_diagTempName, InputLayer)

    # A/ UpdateDiagram by fully synchronizing the diagram content; no udpate parameters required
    arcpy.UpdateDiagram_schematics(in_schDataset + "/" + in_schFolder + "/" + in_diagAName)

    # B/ UpdateDiagram by only refreshing attributes on the input diagram's schematic features
    arcpy.UpdateDiagram_schematics(in_schDataset + "/" + in_schFolder + "/" + in_diagBName, "#", U_option1)

    # C/ UpdateDiagram by rebuilding the input diagram from a feature class
    arcpy.UpdateDiagram_schematics(in_schDataset + "/" + in_diagCName, input_FC1, U_option2)

    # D/ UpdateDiagram by appending new features to the input diagram with a partial synchronization
    arcpy.UpdateDiagram_schematics(in_schDataset + "/" + in_diagDName, input_FC2, U_option3)

    # E/ UpdateDiagram by appending new features to the input diagram with a full synchronization
    arcpy.UpdateDiagram_schematics(in_schDataset + "/" + in_diagEName, input_FC3, U_option4)

    # F/ UpdateDiagram by rebuilding the input diagram from an input layer
    arcpy.UpdateDiagram_schematics(in_schDataset + "/" + in_diagFName, InputLayer, U_option2)

    # Returns the Extensión 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 occurred on line %i" % tb.tb_lineno
    print str(e)
UpdateDiagram and XML builder example 3 (stand-alone Python script)

Updates a sample schematic diagram based on the XML builder.How to run this Python script example:

  1. Start ArcCatalog.
  2. Create and configure the schematic dataset used during the sample script:
    • Navigate to the C:\ArcGIS\ArcTutor\Schematics\Schematics_Configuration\XML_Data folder in the Catalog tree.
    • Right-click the GISDatabaseForXML geodatabase, point to New, then click Schematic Dataset.
    • Type XMLDataset for the newly created schematic dataset's name, and press ENTER.
    • Right-click the XMLDataset schematic dataset and click Edit.
    • Right-click the XMLDataset entry in the Dataset Editor tree and click New Schematic Diagram Template.
    • Type XMLDiagrams in the Name text box.
    • Choose XML Builder in the Schematic Builder section.
    • Click Schematic Builder Properties, and check Automatic schematic feature class creation.
    • Close the Builder Properties dialog box.
    • Click OK.
    • Click Save on the Schematic Dataset Editor toolbar, and close the Schematic Dataset Editor.
  3. Copy and paste the following script in the ArcCatalog or ArcMap Python window.
  4. Press ENTER.

# Name: UpdateDiagramXML.py
# Description: Update schematic diagrams based on the XML builder
# Requirement: Extensión ArcGIS Schematics

# import system modules
import arcpy
msgNoLicenseAvailable = "Extensión ArcGIS Schematics license required"

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

    # Sets Schematics general settings
    dataLocation="C:/ArcGIS/ArcTutor/Schematics/Schematics_Configuration/XML_Data"
    gdbName="GISDatabaseForXML.gdb"
    in_schDataset="XMLDataset"
    in_diagName="XMLDiagramFeeder1"
    in_diagTempName="XMLDiagrams"
    input_XmlFile1="SampleNetworkFeeder1.xml"
    input_XmlFile2="SampleNetworkUpdatedFeeder1.xml"

    # Sets environment settings
    arcpy.env.overwriteOutput = True
    arcpy.env.workspace = dataLocation + "/" + gdbName

    # CreateDiagram from a XML file, SampleNetworkFeeder1.xml
    arcpy.CreateDiagram_schematics(in_schDataset, in_diagName, in_diagTempName, dataLocation + "/" + input_XmlFile1)

    # Updates the XMLDiagramFeeder1 diagram from another XML file, SampleNetworkUpdatedFeeder1.xml
    arcpy.UpdateDiagram_schematics(in_schDataset + "/" + in_diagName, dataLocation + "/" + input_XmlFile2)

    # Returns the Extensión 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)
UpdateDiagram and Network Dataset builder example 4 (stand-alone Python script)

Updates schematic diagrams based on the Network Dataset builder.How to use this Python script example:

  1. Start ArcMap.
  2. Open the ParisTours.mxd file stored in C:\ArcGIS\ArcTutor\Schematics\Schematics_Configuration\Network_Dataset.
  3. Click Geoprocessing > Geoprocessing Options.
  4. Uncheck Enable on the Background Processing section, and click OK.
  5. Copy and paste the following script in the Python window.

# Name: UpdateDiagramNDS.py
# Description: Update sample schematic diagrams based on the Network Dataset builder
# Requirement: Extensión ArcGIS Schematics,Extensión ArcGIS Network Analyst 

# import system modules
import arcpy
msgNoLicenseSchematicsAvailable = "Extensión ArcGIS Schematics license required"
msgNoLicenseNetworkAnalystAvailable = "Extensión ArcGIS Network Analyst license required"

try:
    # Checks out the Extensión ArcGIS Schematics licence
    if arcpy.CheckExtension("Schematics") == "Available":
        arcpy.CheckOutExtension("Schematics")
    else:
        raise Exception(msgNoLicenseSchematicsAvailable)

    # Checks out the Extensión ArcGIS Network Analyst licence
    if arcpy.CheckExtension("Network") == "Available":
        arcpy.CheckOutExtension("Network")
    else:
        raise Exception(msgNoLicenseNetworkAnalystAvailable)

    # Sets general settings
    dataLocation="C:/ArcGIS/ArcTutor/Schematics/Schematics_Configuration/Network_Dataset"
    gdbName="NetworkAnalyst_Schematics.gdb"
    in_schDataset="NA_SchematicDataset"
    in_diagAName="DiagramTour2_A"
    in_diagBName="DiagramTour2_B"
    in_diagTempName="NADiagrams"
    in_NALayerName="Routes/Tour2"
    # builder_options variables for diagram Generation and Update
    G_option1="MERGE_NODES"
    G_option2="NO_MERGE_NODES"
    U_option1="NO_MERGE_NODES;KEEP_MANUAL_MODIF"
    U_option2="MERGE_NODES;KEEP_MANUAL_MODIF"

    # Sets environment settings
    arcpy.env.overwriteOutput = True
    arcpy.env.workspace = dataLocation + "/" + gdbName

    # UpdateDiagram from a solved route network analysis layer
    # 1) Solves the route network analysis layer, 
    arcpy.Solve_na(in_NALayerName)
    # 2) Creates diagrams from this solved route network analysis layer
    # a - A diagram where a single node is created to represent a GIS point crossed N times along this route (G_option1)
    arcpy.CreateDiagram_schematics(in_schDataset, in_diagAName, in_diagTempName, in_NALayerName, G_option1)
    # b - A diagram where N nodes are created to represent a GIS point crossed N times along this route (G_option2)
    arcpy.CreateDiagram_schematics(in_schDataset, in_diagBName, in_diagTempName, in_NALayerName, G_option2)
    # 3) Updates those diagrams from the same solved route network analysis layer by changing the merge nodes option
    arcpy.UpdateDiagram_schematics(in_schDataset + "/" + in_diagAName, in_NALayerName, U_option1)
    arcpy.UpdateDiagram_schematics(in_schDataset + "/" + in_diagBName, in_NALayerName, U_option2)

    # Returns the licences
    arcpy.CheckInExtension("Schematics")
    arcpy.CheckInExtension("Network")

    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 occurred on line %i" % tb.tb_lineno
    print str(e)

Entornos

Esta herramienta no utiliza ningún entorno de geoprocesamiento.

Información sobre licencias

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

Temas relacionados

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

ArcGIS Desktop

  • Inicio
  • Documentación
  • Soporte

Plataforma ArcGIS

  • ArcGIS Online
  • ArcGIS Desktop
  • ArcGIS Enterprise
  • ArcGIS for Developers
  • 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 © 2019 Esri. | Privacidad | Legal