Select to view content in your preferred language

Trace Network in the ArcGIS Pro SDK

215
9
Tuesday
EdwardBlair
Frequent Contributor

Hi -

I'm looking for examples of how to with with Trace Network features in the Pro SDK.  Starting with how to open a Trace Network from a geodatabase.

CoPilot says I can do this:

var tn = geodatabase.Open<TraceNetwork>("MyTraceNetwork")

but, as often seems to be the case, CoPilot appears to have lied to me.

Any suggestions would be appreciated.

Thx,

Ed

 

 

0 Kudos
9 Replies
GKmieliauskas
Esri Regular Contributor

Hi,

Take a look to another thread "Connectivity trace"

0 Kudos
EdwardBlair
Frequent Contributor

Thanks for this.   I've actually seen the post.   But its not really what I'm looking for.   I should have been more clear.   

In the GN you can get a feature cast it to a network object, like a simple junction, and from that find out what its connected to.   You can take similar steps to find what connected to a given feature in the UN.   I need to do the same for features in a Trace Network.

Thanks again,

Ed

0 Kudos
GKmieliauskas
Esri Regular Contributor

You can use geoprocessing tool Trace. How to call it from ArcGIS Pro SDK look here.

Link to "Trace a trace network" is here. It writes about geoprocessing usage

0 Kudos
EdwardBlair
Frequent Contributor

Again.. I'm not looking for how to perform a trace.   I see that.  What I'm looking for is a way to examine a selected feature that participates in the trace network and discover what other features it's connected to... without performing a trace. 

The equivalent of the GN:

ISimpleJunctionFeature::EdgeFeature

Ed

 

0 Kudos
GKmieliauskas
Esri Regular Contributor

Part of ArcObjects doesn't have analogues in ArcGIS Pro API. Usually geoprocessing tools are used instead. All tools in Trace Network tab use geoprocessing tool Trace with different parameters.

Can you do your workflow with standard ArcGIS Pro tools? 

0 Kudos
EdwardBlair
Frequent Contributor

Not as far as I can tell.   We need to operate on a set of selected features and determined what they are connected to, with the possibility that they are not connected to anything.

Someone had the idea that we could use a Trace Network for this, but it looks like that will not work.

Ed

0 Kudos
RobertKrisher
Esri Regular Contributor

 This is not available in the ArcGIS Pro SDK, but please log an enhancement request for this as its something we have considered implementing at some point in the future.  However, you CAN already do this using the ArcGIS Enterprise SDK (IUtilityNetworkQuery2 Interface | ArcGIS Enterprise SDK | Esri Developer), the most common way of exposing this capability is through a SOE or SOI, in your case you would probably want to build an SOE for this.

0 Kudos
EdwardBlair
Frequent Contributor

Thanks Robert -

Our use case is this.   We currently represent substation internals in a geometric network separate (spatially and logically) from the distribution network.  As an initial step in our UN journey the thought was to include distribution features in the UN network, but put substation internals into a simpler trace network.  With a long-term goal of incorporating the internals into the UN.

Seems to me, knowing what I've discovered about the trace network, this strategy will not work.  A better approach for us may be to include the sub internals in a separate utility network.   But we're still mulling this over.

Ed

0 Kudos
RobertKrisher
Esri Regular Contributor

I think putting it in a utility network is a better plan, since this mean you can set up some basic subnetworks for each substation that represent what you need to extract into your OMS/ADMS. If you only care about the distribution side of each substation, set up the power transformer as a subnetwork controller and you're ready to start exporting substations (now all you need to do is transform them).

0 Kudos