Skip to content
ESM: import CircuitSection from "@arcgis/core/networks/support/CircuitSection.js";
CDN: const CircuitSection = await $arcgis.import("@arcgis/core/networks/support/CircuitSection.js");
Class: @arcgis/core/networks/support/CircuitSection
Inheritance: CircuitSectionAccessor
Since: ArcGIS Maps SDK for JavaScript 4.34
beta

Represents a circuit section in a telecom domain network.

Creating a CircuitSection

CircuitSections may be created in one of three ways: with start location and stop location, with a subcircuit, or with neither.

Keep in mind that sectionId must always be specified when instantiating a Circuit, and sectionType may optionally be specified during instantiation (defaults to physical).

With start and stop location

If created with start and stop locations, the section does not consume a subcircuit.

const startLocation = new CircuitLocation({
  sourceId: 20,
  globalId: "{728C3E4A-DA4B-4766-9CA5-AF19B9E3F89C}",
  terminalId: 1,
  firstUnit: 1,
  numUnits: 1,
});

const stopLocation = new CircuitLocation({
  sourceId: 20,
  globalId: "{0E3D7C20-E74D-482F-AE40-4319BCF0EA74}",
  terminalId: 1,
  firstUnit: 1,
  numUnits: 1,
});

const section = new CircuitSection({
  sectionId: 1,
  sectionType: "physical",
  startLocation,
  stopLocation,
});

With a subcircuit

If created with a subcircuit, the section does consume a subcircuit.

const section = new CircuitSection({
  sectionId: 1,
  sectionType: "physical",
  subcircuit: new Subcircuit({
    name: "SUBCIRCUITVALUE1",
    isReserved: false,
  }),
});

As an empty section

To create an empty circuit section:

const section = new CircuitSection({ sectionId: 1 });
See also

Constructors

CircuitSection

Constructor
new CircuitSection(properties)
Parameter
properties Object
optional

See the properties for a list of all the properties that may be passed into the constructor.

Property Overview

Any properties can be set, retrieved or listened to. See the Watch for changes topic.
Show inherited properties Hide inherited properties
Name Type Summary Class

The name of the class.

Accessor

The path between the circuit's start and stop locations.

CircuitSection

The role of the section in the consuming circuit.

CircuitSection

The unique identifier of the circuit section within a circuit.

CircuitSection

Indicates the type of the circuit section.

CircuitSection

The start location associated with the circuit section.

CircuitSection

The stop location associated with the circuit section.

CircuitSection

The subcircuit being consumed by the circuit section.

CircuitSection

Property Details

declaredClass

Inherited
Property
declaredClass Stringreadonly
Inherited from Accessor

The name of the class. The declared class name is formatted as esri.folder.className.

path

Property
path CircuitPath |null |undefinedreadonly

The path between the circuit's start and stop locations. This property is null unless the circuit section is returned by a circuit trace on a sectioned circuit.

role

Property
role Stringreadonly

The role of the section in the consuming circuit. This is a system-maintained field derived from the SectionOrder field in the Circuit table.

Possible Values:"start-and-end" |"start" |"midspan" |"end"

sectionId

Property
sectionId Number

The unique identifier of the circuit section within a circuit. This property is used to define section order in a circuit.

sectionType

Property
sectionType Stringautocast

Indicates the type of the circuit section. A virtual circuit section does not require traversability between its start and stop locations.

Possible Values:"physical" |"virtual"

startLocation

Property
startLocation CircuitLocation |null |undefinedautocast

The start location associated with the circuit section. This property is null if the circuit section consumes a subcircuit.

stopLocation

Property
stopLocation CircuitLocation |null |undefinedautocast

The stop location associated with the circuit section. This property is null if the circuit section consumes a subcircuit.

subcircuit

Property
subcircuit Subcircuit |null |undefinedautocast

The subcircuit being consumed by the circuit section.

Method Overview

Show inherited methods Hide inherited methods
Name Return Type Summary Class

Adds one or more handles which are to be tied to the lifecycle of the object.

Accessor

Returns true if a named group of handles exist.

Accessor

Removes a group of handles owned by the object.

Accessor
void

Sets the start and stop locations of the circuit section.

CircuitSection
void

Sets the subcircuit for the circuit section to consume.

CircuitSection

Method Details

addHandles

Inherited
Method
addHandles(handleOrHandles, groupKey)
Inherited from Accessor

Adds one or more handles which are to be tied to the lifecycle of the object. The handles will be removed when the object is destroyed.

// Manually manage handles
const handle = reactiveUtils.when(
  () => !view.updating,
  () => {
    wkidSelect.disabled = false;
  },
  { once: true }
);

this.addHandles(handle);

// Destroy the object
this.destroy();
Parameters
handleOrHandles WatchHandle|WatchHandle[]

Handles marked for removal once the object is destroyed.

groupKey *
optional

Key identifying the group to which the handles should be added. All the handles in the group can later be removed with Accessor.removeHandles(). If no key is provided the handles are added to a default group.

hasHandles

Inherited
Method
hasHandles(groupKey){Boolean}
Inherited from Accessor

Returns true if a named group of handles exist.

Parameter
groupKey *
optional

A group key.

Returns
Type Description
Boolean Returns true if a named group of handles exist.
Example
// Remove a named group of handles if they exist.
if (obj.hasHandles("watch-view-updates")) {
  obj.removeHandles("watch-view-updates");
}

removeHandles

Inherited
Method
removeHandles(groupKey)
Inherited from Accessor

Removes a group of handles owned by the object.

Parameter
groupKey *
optional

A group key or an array or collection of group keys to remove.

Example
obj.removeHandles(); // removes handles from default group

obj.removeHandles("handle-group");
obj.removeHandles("other-handle-group");

setStartStopLocations

Method
setStartStopLocations(startLocation, stopLocation){void}

Sets the start and stop locations of the circuit section. This method sets the section's subcircuit to null.

Parameters
startLocation CircuitLocation

The start location of the circuit section.

stopLocation CircuitLocation

The stop location of the circuit section.

Returns
Type Description
void

setSubcircuit

Method
setSubcircuit(subcircuit){void}

Sets the subcircuit for the circuit section to consume. This method sets the section's startLocation and stopLocation to null.

Parameter
subcircuit Subcircuit

The subcircuit that the section will consume.

Returns
Type Description
void

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