Skip To Content
ArcGIS Developer
Dashboard

Schematic Algorithm

Description

The Schematic Algorithm resource represents a single schematic algorithm among all the algorithms available for a diagram template. It is returned with the following information:

  • id: The algorithm ID (Long)
  • name: The name of the algorithm (Strong)
  • parameters: OPTIONAL - An array of <algoParameter> when the algorithm works with parameters. In that case, for each <algoParameter> algorithm parameter, the following triplet is returned:
    • name: The algorithm parameter name
    • type: The algorithm parameter type
    • value: The algorithm parameter value

The Schematic Algorithm resource supports the Apply operation. It is used to perform a layout algorithm on a schematic diagram.

Request parameters

ParameterDetails
f

The response format. The default response format is html.

Values: html | json

Example usage

Example 1: The algorithmID 3 returns the Geo - Force Directed algorithm for the diagram template which id is '2' under the S1_Schematics public sample Schematics service

https://servicesbeta6.esri.com/arcgis/rest/services/S1_Schematics/MapServer/exts/SchematicsServer/templates/2/algorithms/3

Example 2: The algorithmID 3 returns the Hierarchical - Main Line Tree algorithm for the diagram template which id is '0' under the S2_InternalPlants public sample Schematics service

https://servicesbeta6.esri.com/arcgis/rest/services/S2_InternalPlants/MapServer/exts/SchematicsServer/templates/0/algorithms/3

JSON Response syntax


            //Syntax for an algorithm without parameters
{
  "id" : <Algo1Id>,
  "name" : "<Algo1Name>"
}


//Syntax for an algorithm with N parameters
{
  "id" : <AlgoId>,
  "name" : "<AlgoLabel>",
  "parameters" :[
    {
      "name" : "<AlgoParam1Name>", 
      "type" : "<AlgoParam1Type>", 
      "value" : <AlgoParam1Value> 
    },
    {
      ...
    },
    {
      "name" : "<AlgoParamNName>", 
      "type" : "<AlgoParamNType>", 
      "value" : <AlgoParamNValue> 
    }
  ]
},
{
  ...
}
]

JSON Response example


            //Sample response for the Square Links algorithm
{
   "id" : 0,
   "name" : "Square Links",
   "parameters" :[
     {
       "name" : "PreservePath", 
       "type" : "Boolean", 
       "value" : true 
     }
   ]
}


//Sample response for the Bypass Nodes algorithm
{
   "id" : 1,
   "name" : "Bypass Nodes"
}


//Sample response for the Hierarchical - Compact Tree algorithm
{
   "id" : 2,
   "name" : "Hierarchical - Compact Tree",
   "parameters" :[
     {
       "name" : "Direction", 
       "type" : "Long", 
       "value" : 2 
     },
     {
       "name" : "SpacingAlongDirection", 
       "type" : "Double", 
       "value" : 2 
     },
     {
       "name" : "SpacingPerpendicularToDirection", 
       "type" : "Double", 
       "value" : 2 
     },
     {
       "name" : "BreakPoint", 
       "type" : "Double", 
       "value" : 0.5 
     },
     {
       "name" : "OrthogonalDisplay", 
       "type" : "Boolean", 
       "value" : False 
     },
     {
       "name" : "AbsoluteUnits", 
       "type" : "Boolean", 
       "value" : True 
     }
   ]
}