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.

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

Parameter

Details

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:

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:

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