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

ArcGIS.Core.Data.UtilityNetwork Namespace > UtilityNetwork Class > CreateElement Method : CreateElement(AssetType,Guid) Method
The AssetType of the row used to create the Element.
The global ID of the row 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 Element CreateElement( 
   AssetType assetType,
   Guid globalID
)
Public Overloads Function CreateElement( _
   ByVal assetType As AssetType, _
   ByVal globalID As Guid _
) 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.

Return Value

An Element object corresponding to globalID from a NetworkSource associated with assetType.
Exceptions
ExceptionDescription
assetType is null.
A geodatabase-related exception has occurred.
Remarks
No default Terminal is assigned. 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 10, Windows 8.1

See Also

Reference

UtilityNetwork Class
UtilityNetwork Members
Overload List