Skip To Content

Apply Template Layouts (Network Diagram service)

  • URL:https://<diagram-url>/applyTemplateLayouts
  • Version Introduced: 10.6

Description

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

It is used to re-apply the list of the layout algorithms currently configured on the template the resource diagram is based on.

License:
The active portal account must be licensed with the ArcGIS Advanced Editing 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

junctionObjectIDs

Description: For the case you want the template layout algorithms to apply to a diagram part, list of junction ObjectIDs (long) that will be processed:

Syntax: junctionObjectIDs=[<DiagJctOid1>, …, <DiagJctOidN]

Example: junctionObjectIDs=[1,2,3,4,5]

containerObjectIDs

Description: For the case you want the template layout algorithms to apply to a diagram part, a list of container ObjectIDs (long) that will be processed:

Syntax: containerObjectIDs=[<DiagConOid1>, …, <DiagConOidN]

Example: containerObjectIDs=[1]

edgeObjectIDs

Description: For the case you want the template layout algorithms to apply to a diagram part, a list of edge ObjectIDs (long) that will be processed:

Syntax: edgeObjectIDs=[<DiagEdgOid1>, …, <DiagEdgOidN]

Example: edgeObjectIDs=[1,2,3]

f

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

Values: <html | json>

Example Usage

Re-applying the set of diagram layout configured on the template on the DiagramTest1 diagram in ABV1 version; that is:

  • URL: https://myserver.esri.com/server/rest/services/Naperville/NetworkDiagramServer/diagrams/DiagramTest1/applyTemplateLayouts
  • Parameters:
    gdbVersion=ABV1
    sessionId=
    junctionObjectIDs=
    containerObjectIDs=
    edgeObjectIDs=
    f=pjson
  • Sent URL (GET): https://myserver.esri.com/server/rest/services/Naperville/NetworkDiagramServer/diagrams/DiagramTest1/applyTemplateLayouts?gdbVersion=ABV1&sessionId=&junctionObjectIDs=&containerObjectIDs=&edgeObjectIDs=&f=pjson

JSON Response Syntax

A JSON object composed of a Diagram JSON Information object and the moment (date) the applyTemplateLayouts operation happens for a stored diagram: {"diagramInfo": Diagram JSON Information, "moment": <moment>}

Note:

The moment is only returned for a stored diagram.

JSON Response Example

{
 "diagramInfo": {
  "tag": "",
  "isStored": true,
  "isSystem": false,
  "creator": "acb7352",
  "creationDate": 1480322602000,
  "lastUpdateBy": "acb7352",
  "lastUpdateDate": 1480510663000,
  "containerMargin": 0.5,
  "junctionCount": 12,
  "edgeCount": 10,
  "containerCount": 2,
  "aggregationCount": 0,
  "access": "esriDiagramPublicAccess",
  "diagramExtent": {
   "xmin": 1034510.9868998453,
   "ymin": 1871808.4880382791,
   "xmax": 1034521.2178505138,
   "ymax": 1871862.6050560325,
   "spatialReference": {
    "wkid": 102671,
    "latestWkid": 3435
   }
  },
  "networkExtent": {
   "xmin": 1034510.9868998453,
   "ymin": 1871808.4880382791,
   "xmax": 1034521.2178505138,
   "ymax": 1871862.6050560325,
   "spatialReference": {
    "wkid": 102671,
    "latestWkid": 3435
   }
  },
  "name": "DiagramTest1",
  "id": "{5330ED92-B6CE-4EF7-9A10-E4D5BF77582B}",
  "template": "ExpandContainers"
 },
 "moment": 1490869536422
}