GetTable Method (UtilityNetwork)
Returns the
ArcGIS.Core.Data.Table that corresponds to a
NetworkSource. This method must be called on the MCT. Use QueuedTask.Run
Parameters
- networkSource
- The NetworkSource object to use to return a ArcGIS.Core.Data.Table.
Return Value
Fetching a Row from an Element
{
static Row FetchRowFromElement(UtilityNetwork utilityNetwork, Element element)
{
// Get the table from the element
using (Table unTable = utilityNetwork.GetTable(element.NetworkSource))
{
// Create a query filter to fetch the appropriate row
QueryFilter queryFilter = new QueryFilter()
{
ObjectIDs = new List<long>() { element.ObjectID }
};
// Fetch and return the row
using (RowCursor rowCursor = unTable.Search(queryFilter))
{
if (rowCursor.MoveNext())
{
return rowCursor.Current;
}
return null;
}
}
}
}
Target Platforms: Windows 11 Home, Pro, Enterprise (64 bit)
ArcGIS Pro version: 3.0 or higher.