Skip To Content

Create Diagram From Features

Description

The createDiagramFromFeatures operation is performed on a Network Diagram Service resource. The result of this operation is a Diagram Information JSON object.

It is used to create a new temporary network diagram.

Licencia:
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

template

Required

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

Syntax: template=<templateName>

Example: template=ExpandContainers

initialFeatures

Required

Description: An array of utility network features 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

Description: 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 GlobalIDs 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:
    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 GlobalID is {F8199534-8B77-4D26-8C3C-8A55DB66728E}, that is:

  • URL: https://myserver.esri.com/server/rest/services/Naperville/NetworkDiagramServer/createDiagramFromFeatures
  • Parameters:
    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

{
 "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"
 }
}