Create Diagram From Features

URL:
https://<root>/<serviceName>/NetworkDiagramServer/createDiagramFromFeatures
Methods:
POST
Version Introduced:
10.6

Description

The createDiagramFromFeatures operation creates a new diagram resource. 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: template=<templateName>

Example: template=ExpandContainers

initialFeatures


(Required)

An array of network element Global IDs from which the new diagram is going to be built.

Syntax: ["<UNglobalID1>", ...,"<UNglobalIDN>"]

Example: ["{22E157ED-68A0-407D-9F06-A030C5A1995F}","{BDCD6D28-D03B-4099-8F2E-DCB7665DD0F0}","{BAF7AC0F-47CB-479A-A916-827D18890375}"]

f

The response format. The default response format is html.

Values: <html | json>

Example Usage

Creating a new temporary network diagram based on the ExpandContainers template from three utility network distribution lines which Global IDs are {22E157ED-68A0-407D-9F06-A030C5A1995F}, {BDCD6D28-D03B-4099-8F2E-DCB7665DD0F0} and {BAF7AC0F-47CB-479A-A916-827D18890375}; that is:

  • URL: https://myserver.esri.com/server/rest/services/Naperville/NetworkDiagramServer/createDiagramFromFeatures

  • Parameters:

    Use dark colors for code blocksCopy
    1
    2
    3
    4
    5
    gdbVersion=
    sessionId=
    template=ExpandContainers
    initialFeatures=["{22E157ED-68A0-407D-9F06-A030C5A1995F}","{BDCD6D28-D03B-4099-8F2E-DCB7665DD0F0}","{BAF7AC0F-47CB-479A-A916-827D18890375}"]
    f=pjson
  • Sent GET URL: https://myserver.esri.com/server/rest/services/Naperville/NetworkDiagramServer/createDiagramFromFeatures?gdbVersion=&sessionId=&template=ExpandContainers&initialFeatures=%5B%22%7B22E157ED-68A0-407D-9F06-A030C5A1995F%7D%22%2C%22%7BBDCD6D28-D03B-4099-8F2E-DCB7665DD0F0%7D%22%2C%22%7BBAF7AC0F-47CB-479A-A916-827D18890375%7D%22%5D&f=pjson

Creating a new temporary network diagram in version ABV1 based on the Basic template from the distribution line which Global ID is {F8199534-8B77-4D26-8C3C-8A55DB66728E}, that is:

  • URL: https://myserver.esri.com/server/rest/services/Naperville/NetworkDiagramServer/createDiagramFromFeatures

  • Parameters:

    Use dark colors for code blocksCopy
    1
    2
    3
    4
    5
    gdbVersion=ABV1
    sessionId=
    template=Basic
    initialFeatures=["{F8199534-8B77-4D26-8C3C-8A55DB66728E}"]
    f=pjson
  • Sent URL (GET): https://myserver.esri.com/server/rest/services/Naperville/NetworkDiagramServer/createDiagramFromFeatures?gdbVersion=ABV1&sessionId=&template=Basic&initialFeatures=%5B%22%F8199534-8B77-4D26-8C3C-8A55DB66728E%7D%22%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
{
 "diagramInfo": {
  "tag": "",
  "isStored": false,
  "canStore": true,
  "canExtend": true,
  "isSystem": false,
  "creator": "acb7352",
  "creationDate": 1505218557000,
  "lastUpdateBy": "acb7352",
  "lastUpdateDate": 1505218557000,
  "containerMargin": 0.5,
  "junctionCount": 2,
  "edgeCount": 1,
  "containerCount": 0,
  "aggregationCount": 0,
  "isHistorical": false,
  "access": "esriDiagramPublicAccess",
  "diagramExtent": {
   "xmin": 6807921.0110047311,
   "ymin": 1848205.2526849657,
   "xmax": 6808257.8722076416,
   "ymax": 1848207.8143596351,
   "spatialReference": {
    "wkid": 3498,
    "latestWkid": 3498
   }
  },
  "networkExtent": {
   "xmin": 6807921.0110047311,
   "ymin": 1848205.2526849657,
   "xmax": 6808257.8722076416,
   "ymax": 1848207.8143596351,
   "spatialReference": {
    "wkid": 3498,
    "latestWkid": 3498
   }
  },
  "name": "7C458C4491F94B5591635AFA029816FF",
  "id": "{EEEAF10B-FD9B-4DEE-B911-3E65FAA5A3B2}",
  "template": "Basic"
 }
}

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