ArcGIS Pro 2.9 API Reference Guide
CreateElement(AssetType,Guid,Terminal) Method

ArcGIS.Core.Data.UtilityNetwork Namespace > UtilityNetwork Class > CreateElement Method : CreateElement(AssetType,Guid,Terminal) Method
The AssetType of the row used to create the Element.
The global ID of the row used to create the Element.
The terminal used to create the Element.
Creates an Element object, which represents a Row (or Row + Terminal) in a utility network. This method must be called on the MCT. Use QueuedTask.Run.
Syntax
Public Overloads Function CreateElement( _
   ByVal assetType As AssetType, _
   ByVal globalID As Guid, _
   ByVal terminal As Terminal _
) As Element

Parameters

assetType
The AssetType of the row used to create the Element.
globalID
The global ID of the row used to create the Element.
terminal
The terminal used to create the Element.

Return Value

An Element object corresponding to globalID and terminal from a NetworkSource associated with assetType.
Exceptions
ExceptionDescription
assetType is null.
If terminal is not null and is not a member of the TerminalConfiguration of assetType. AssetType.
A geodatabase-related exception has occurred.
This method or property must be called within the lambda passed to QueuedTask.Run
Remarks
This overload allows the creation of a Element when no ArcGIS.Core.Data.Row is available. If you don't already have a Row object, fetching one requires an additional query (database query or round-trip call to the feature service). This constructor allows this extra call to be avoided.
Requirements

Target Platforms: Windows 11, Windows 10, Windows 8.1

See Also

Reference

UtilityNetwork Class
UtilityNetwork Members
Overload List