Skip To Content
ArcGIS Developer
Dashboard

Save Layout (Network Diagrams)

Description

The saveLayout operation is performed on a Diagram resource. The result of this operation is a Diagram JSON Information object, and the moment (date) the saveLayout operation happens for a stored diagram.

It is used to apply and save new geometries that may have been computed for a set of diagram features represented in the diagram resource.

License:
The active portal account must be licensed with the ArcGIS Utility Network user type extension or the ArcGIS Trace Network user type extension to use this operation.

Request Parameters

ParameterDetails
gdbVersion

Description: The name of the geodatabase version.

Syntax: gdbVersion=<version>

Example: gdbVersion=ABV1

sessionId

Description: The token (guid) used to lock the version.

Syntax: sessionId=<guid>

Example: sessionId=44G259DE-87B0-407D-8F2E-DCB7665DD0F0

junctions

Description: An array of couples {"ID": <jctDEID>,"geometry": <geometry>} providing the new geometry for each edited junction, those diagram junctions being identified thanks to their Diagram Element ID.

Syntax: junctions=[{"ID": <jctDEID1>,"geometry": <geometry1>}, ..., {"ID": <jctDEIDN>,"geometry": <geometryN>}]

Example: junctions=[{"ID": 20,"geometry": { "x": 1034520.83268067986, "y": 1871861.38327369839, "m": null }}]

containers

Description: An array of couples {"ID": <containerDEID>,"geometry": <geometry>} providing the new geometry for each edited container, those diagram containers being identified thanks to their Diagram Element ID.

Syntax: containers=[{"ID": <containerDEID1>,"geometry": <geometry1>}, ..., {"ID": <containerDEIDN>,"geometry": <geometryN>}]

Example: containers=[{"ID": 9,"geometry": { "rings": [ [ [ 1034515.52888551354, 1871859.37343519926 ], [ 1034515.52888551354, 1871863.10505503416 ], [ 1034521.71784951165, 1871863.10505503416 ], [ 1034521.71784951165, 1871859.37343519926 ], [ 1034515.52888551354, 1871859.37343519926 ] ] ] } }]

edges

Description: An array of couples {"ID": <edgeDEID>,"geometry": <geometry>} providing the new geometry for each edited edge, those diagram edges being identified thanks to their Diagram Element ID.

Syntax: edges=[{"ID": <edgeDEID1>,"geometry": <geometry1>}, ..., {"ID": <edgeDEIDN>,"geometry": <geometryN>}]

Example: edges=[{"ID": 14,"geometry": { "hasM": true, "paths": [ [ [ 1034511.2372274287, 1871861.25893011689, null ], [ 1034511.31760784611, 1871808.48803827912, null ] ] ] } }]

f

Description: The response format. The default response format is html.

Values: <html | json>

Example Usage

Applying and saving a new geometry for the container which diagram element ID is 11 in the diagram DiagramTest3 in version ABV1; that is:

  • URL: https://myserver.esri.com/server/rest/services/QuickStart/NetworkDiagramServer/diagrams/DiagramTest3/saveLayout
  • Parameters:
    gdbVersion=ABV1
    sessionId=
    junctions=
    containers=["ID"=11,"geometry"={"rings": [[[6808810.40423905849,1847930.7971971333],[6808810.40423905849,1847931.79719513655],[6808847.84379673,1847931.79719513655],[6808847.84379673,1847930.7971971333],[6808810.40423905849,1847930.7971971333]]]}}]
    edges=
    f=pjson
  • Sent URL (GET): https://myserver.esri.com/server/rest/services/QuickStart/NetworkDiagramServer/diagrams/DiagramTest3/saveLayout?gdbVersion=ABV1&sessionId=&junctions=&containers=%5B%22ID%22%3D11%2C%22geometry%22%3D%7B%22rings%22%3A+%5B%5B%5B6808810.40423905849%2C1847930.7971971333%5D%2C%5B6808810.40423905849%2C1847931.79719513655%5D%2C%5B6808847.84379673%2C1847931.79719513655%5D%2C%5B6808847.84379673%2C1847930.7971971333%5D%2C%5B6808810.40423905849%2C1847930.7971971333%5D%5D%5D%7D%7D%5D&edges=&f=pjson

:

JSON Response Syntax

A JSON object composed of a Diagram JSON Information object and a moment: {"diagramInfo": Diagram JSON Information, "moment": <moment>}

Note:

The moment is only returned for a stored diagram.

JSON Response Example

{
 "diagramInfo": {
  "tag": "",
  "isStored": true,
  "canStore": false,
  "canExtend": true,
  "isSystem": false,
  "creator": "acb7352",
  "creationDate": 1505219137000,
  "lastUpdateBy": "acb7352",
  "lastUpdateDate": 1505219137000,
  "containerMargin": 0.5,
  "junctionCount": 11,
  "edgeCount": 10,
  "containerCount": 1,
  "aggregationCount": 0,
  "isHistorical": false,
  "access": "esriDiagramPublicAccess",
  "diagramExtent": {
   "xmin": 6807591.7656002343,
   "ymin": 1847967.7367558032,
   "xmax": 6808661.8976463079,
   "ymax": 1848650.1848659664,
   "spatialReference": {
    "wkid": 3498,
    "latestWkid": 3498
   }
  },
  "networkExtent": {
   "xmin": 6807591.7656002343,
   "ymin": 1847967.7367558032,
   "xmax": 6808661.8976463079,
   "ymax": 1848650.1848659664,
   "spatialReference": {
    "wkid": 3498,
    "latestWkid": 3498
   }
  },
  "name": "DiagramTest3",
  "id": "{033B675B-0DFF-4E82-85BC-85DD1235D42C}",
  "template": "Basic"
 },
 "moment": 1505221599567
}