FRAMES | NO FRAMES Description | Parameters | Examples | Response
Generate Diagram (Operation)
URL http://<schematicdiagramtemplate-url>/generateDiagram
Parent Resource Schematic Diagram Template


The generateDiagram operation is performed on a schematic diagram template resource. The result of this operation is a Schematic Diagram Information Object.

It is used to generate a new diagram.

Note: Schematics services published without the Editing operation enabled don't support the generateDiagram operation. Moreover, the generateDiagram operation is only supported on schematic diagram templates with canGenerate=True; that is, when the published map references the schematic diagram template layer.

You can provide arguments to the generateDiagram operation as query parameters defined in the parameters table below.


Parameter Details
f Description: The response format. The default response format is html.

Values: html | json
name Required
Description: The diagram name.


user Required
Description: The diagram creator.



folderID Description: The ID of the folder in which the generated diagram will be stored.
This parameter is optional. If it is not specified, the generated diagram is stored at the schematic dataset root.


builderContext Required
The context for the builder which updates the diagram.
This parameter syntax depends on the diagram builder:
  • Diagrams based on the Standard builder that are generated from a set of GIS features/objects
    In that case, the operation expects the lists of the input GIS feature/object IDs per feature class/object table, and those features/objects version:

    //The lists of the input GIS feature/object IDs per feature class/object table from which the diagram must be generated
    "initialObjects": [
    "objectClassName" : "<objectClass1Name>",
    "objectIDs" : [ID11, ..., IDN]
    "objectClassName" : "<objectClassNName>",
    "objectIDs" : [ID1, ..., IDM]
    //The SDE database reference version for those input GIS features/objects
    "version": "<version>"

    builderContext={"initialObjects": [{"objectClassName": "PipelinesDatabase.SDE.pug_PUG_gas_plants", "objectIDs": [3]}], "version":"sde.DEFAULT"}
    The version parameter is mandatory. We recommend to specify the version when you work with GIS features/objects stored in ArcSDE geodatabases. For this case, when specifying no version, the version used is the one configured on the Associated Object Class section of the Properties tab that displays for the associated schematic feature class when you edit the schematic dataset within Schematic Dataset Editor.

    When generating a schematic diagram based on the Standard builder from a set of GIS features that compose a geometric network or network dataset, if the Standard builder properties are configured with the Add connected nodes option enabled, you can provide only the list of edge/line features.
  • Diagrams based on the Standard builder that are entirely built from custom queries
    In that case, the operation expects an empty list of initial objects.

    builderContext={"initialObjects": []}

    builderContext={"initialObjects": []}
  • Diagrams based on the XML builder
    In that case, the operation expects input XML data:

    builderContext={"XmlSource" : "<XMLSource>"}

    builderContext={"XmlSource" : "\\Dataserver\SchematicsData\pipelines\BrazilDiagram1.xml"}

For diagrams based on the Standard builder entirely built from custom queries, the builderContext parameter must be NULL.

Example Usage

The map used to publish the S1_Schematics Schematics service referenced the MainNetwork schematic diagram template layer.
This template is based on the Standard builder and works from input GIS features organized into a geometric network.
Since this sample service was published without the Editing operation enabled, the generateDiagram operation is not supported.
But, with the Editing operation enabled, you could generate a TestDiagram schematic diagram based on this template (id=2) from a set of PrimaryLine geometric network edge features; for example, {"initialObjects": [{"objectClassName": "PrimaryLine", "objectIDs": [1,2,3,4,5,6,178,179,460,555,973,1537,1809,1810,1972,17973,2292,2293,2321,2322,2323,2324,2326,2627]}]}, by executing the operation as follows:

JSON Response Syntax


JSON Response Example


"name": "DiagramFrom_pug_PUG_gas_plants_ID3",
"id": "0-5",
"templateIdentifier": "0",
"templateObjectID": 892,
"schematicLayerIdentifier": 0,
"folderObjectID": -2,
"folderIdentifier": "-2",
"objectID": 5,
"createdBy": "NCA3885",
"lastModificationBy": "NCA3885",
"lastUpdateBy": "",
"creationDate": "05/13/11 14:13:57",
"lastModificationDate": "05/13/11 14:13:57",
"lastUpdateDate": "",
"lockedBy": "",
"version": "sde.DEFAULT",
"extent": {
"xmin": -37.342619999999989,
"ymin": -11.398460000000886,
"xmax": -37.342179999999097,
"ymax": -11.398019999999997,
"spatialReference": {
"wkid": 4326,
"latestWkid": 4326