Create Diagram From Trace Locations

URL:
https://<root>/<serviceName>/NetworkDiagramServer/createDiagramFromTraceLocations
Methods:
POST
Version Introduced:
11.5

Description

The createDiagramFromTraceLocations operation creates a new diagram resource starting from trace locations provided as inputs. It is performed on a Network Diagram Service resource. The result of this operation is a Diagram Information JSON object. The newly created diagram is a temporary diagram.

Request Parameters

ParameterDetails

gdbVersion

The name of the geodatabase version.

Syntax: gdbVersion=<version>

Example: gdbVersion=ABV1

sessionId

The token (guid) used to lock the version.

Syntax: sessionId=<guid>

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

template


(Required)

The name of the diagram template the new network diagram will be based on.

Syntax:

Use dark colors for code blocksCopy
1
template=<templateName>

Example:

Use dark colors for code blocksCopy
1
template=ExpandContainers

traceLocations


(Required)

An array of trace locations from which the new diagram is going to be built.

Syntax:

Use dark colors for code blocksCopy
1
2
3
4
5
6
7
8
9
10
11
[
 {
   "traceLocationType": `startingPoint` | `barrier` | `stoppingPoint`,
   "globalId": <guid>,
   "terminalId": <long>,   // optional
   "percentAlong": <double>, // optional
   "isFilterBarrier": `true` | `false` // optional
   "firstUnit": <long>, // optional
   "numUnits": <long> // optional
 }
]

Example:

Use dark colors for code blocksCopy
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
[
  {
    "traceLocationType": "startingPoint",
    "globalId": "{B541051B-826F-4489-83A0-31C57D98B0BC}",
    "terminalId": 41,
    "percentAlong": -1,
    "isFilterBarrier": false,
    "firstUnit": 1,
    "numUnits": 1
  },
  {
    "traceLocationType": "startingPoint",
    "globalId": "{5E76C3C4-F181-4608-835F-9D3FFFE3EA77}",
    "terminalId": 41,
    "percentAlong": -1,
    "isFilterBarrier": false,
    "firstUnit": 1,
    "numUnits": 1
  },
  {
    "traceLocationType": "barrier",
    "globalId": "{790FD562-8DF5-4575-9AA9-397044105D12}",
    "terminalId": 31,
    "percentAlong": -1,
    "isFilterBarrier": false,
    "firstUnit": 1,
    "numUnits": 1
  }
]

f

The response format. The default response format is html.

Values: <html | json>

Example Usage

The following is a sample request URL for the createDiagramFromTraceLocations operation that demonstrates creating a new temporary network diagram based on the SwitchingFromDistributionSubnetworkCtrl template from terminal ID 41 existing on two subnetwork controllers (whose Global IDs are DEAD44B0-73F8-4C7E-B40F-F12B196544F1 and 2F82291C-ED2E-40F5-AB36-FEB0C50E3353):

  • URL:

    Use dark colors for code blocksCopy
    1
    https://myserver.esri.com/server/rest/services/Naperville/NetworkDiagramServer/createDiagramFromTraceLocations
  • Parameters:

    Use dark colors for code blocksCopy
    1
    2
    3
    4
    5
    gdbVersion=
    sessionId=
    template=SwitchingFromDistributionSubnetworkCtrl
    traceLocations=[{"traceLocationType":"startingPoint","globalId":"{DEAD44B0-73F8-4C7E-B40F-F12B196544F1}","terminalId":41,"percentAlong":-1,"isFilterBarrier":false,"firstUnit":1,"numUnits":1},{"traceLocationType":"startingPoint","globalId":"{2F82291C-ED2E-40F5-AB36-FEB0C50E3353}","terminalId":41,"percentAlong":-1,"isFilterBarrier":false,"firstUnit":1,"numUnits":1}]
    f=pjson
  • Sent URL (GET):

    Use dark colors for code blocksCopy
    1
    https://myserver.esri.com/server/rest/services/UtilityNetwork/ElecFoundation_V7_SQL/NetworkDiagramServer/createDiagramFromTraceLocations?gdbVersion=&sessionId=&moment=&template=SwitchingFromDistributionSubnetworkCtrl&traceLocations=%5B%7B%22traceLocationType%22%3A%22startingPoint%22%2C%22globalId%22%3A%22%7BDEAD44B0-73F8-4C7E-B40F-F12B196544F1%7D%22%2C%22terminalId%22%3A41%2C%22percentAlong%22%3A-1%2C%22isFilterBarrier%22%3Afalse%2C%22firstUnit%22%3A1%2C%22numUnits%22%3A1%7D%2C%7B%22traceLocationType%22%3A%22startingPoint%22%2C%22globalId%22%3A%22%7B2F82291C-ED2E-40F5-AB36-FEB0C50E3353%7D%22%2C%22terminalId%22%3A41%2C%22percentAlong%22%3A-1%2C%22isFilterBarrier%22%3Afalse%2C%22firstUnit%22%3A1%2C%22numUnits%22%3A1%7D%5D&f=pjson`

JSON Response Syntax

A Diagram JSON Information object.

JSON Response Example

Use dark colors for code blocksCopy
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
{
 "diagramInfo": {
  "tag": "",
  "isStored": false,
  "canStore": true,
  "canExtend": false,
  "isSystem": false,
  "creator": "ndadmin",
  "creationDate": 1738344870000,
  "lastUpdateBy": "acb7352",
  "lastUpdateDate": 1738344870000,
  "containerMargin": 75,
  "junctionCount": 46,
  "edgeCount": 51,
  "containerCount": 14,
  "aggregationCount": 9476,
  "isHistorical": false,
  "reflexiveEdgeRadius": 1,
  "access": "esriDiagramPublicAccess",
  "diagramExtent": {
   "xmin": 1027104.3120806776,
   "ymin": 1863281.7399999425,
   "xmax": 1035054.3122567609,
   "ymax": 1871981.7399883568,
   "spatialReference": {
    "wkid": 102671,
    "latestWkid": 3435,
    "vcsWkid": 105703,
    "latestVcsWkid": 6360
   }
  },
  "networkExtent": {
   "xmin": 1026640.5931918435,
   "ymin": 1862504.1933266893,
   "xmax": 1036507.4494423419,
   "ymax": 1872012.4922234416,
   "zmin": 0,
   "zmax": 0,
   "mmin": 0,
   "mmax": 0,
   "spatialReference": {
    "wkid": 102671,
    "latestWkid": 3435,
    "vcsWkid": 105703,
    "latestVcsWkid": 6360
   }
  },
  "name": "7F4CB100857B41D5B4D60AC364E6A607",
  "id": "{E85D5E82-5318-4F80-B6F9-FF16D20C1677}",
  "template": "SwitchingFromDistributionSubnetworkCtrl"
 }
}

Your browser is no longer supported. Please upgrade your browser for the best experience. See our browser deprecation post for more details.