Attribute Assistant - GN method to update all connected edges

1250
6
08-18-2020 08:29 AM
AlistairMcDougall1
Esri Contributor

Hello, I'm late to the game on AA - very handy add-in! I have some simple data in a geometric network (one edge fc, one junction fc) and have configured some rules to populate values on my edge fc from the junction fc when creating a new edge or when a junction is updated. My DynamicValue table looks something like:

TableFieldValue MethodValue Info
Pipedownstream_depthTO_JUNCTION_FIELDdepth
Pipeupstream_depthFROM_JUNCTION_FIELDdepth
ChamberdepthUPDATE_TO_EDGE_FIELDdownstream_depth
ChamberdepthUPDATE_FROM_EDGE_FIELDupstream_depth

For the UPDATE_ methods, works great when a single edge is connected to a single junction, but in a case where two or more edges connect to one junction (a fork in the road), only one edge is updated automatically upon an edit. I can select the other edge(s) and manually run the rules from the toolbar and the edges are updated as expected. Using GN tools, I can see the junction knows it's connected to 3+ edges.

  

Is there a way to configure AA to auto-apply the UPDATE_TO/FROM_EDGE FIELD method to all edges connected to the junction?

Thanks in advance!

0 Kudos
6 Replies
MikeMillerGIS
Esri Frequent Contributor

Take a look at the Update From Edge Field and Update To Edge Field methods.  This will update the connected from/to edges when a junction is updated.  Is that what you are looking for?  

0 Kudos
AlistairMcDougall1
Esri Contributor

Thanks for the response, I am using those methods but it seems they only will update one connected edge automatically when an edit to the junction is made? For example when I change the depth value for the middle junction:

Only the edge to the right is updated automatically, the rest I need to select and run the rule manually from the toolbar:

Just wondering if this is expected behaviour? Thanks 

0 Kudos
MikeMillerGIS
Esri Frequent Contributor

Ah, sorry, missed that in your table.  Let me look at the code.

0 Kudos
MikeMillerGIS
Esri Frequent Contributor

It should update all connected edges, but it is based on To From

I am comparing Geometry to ensure the line is connected correctly,

iJuncFeat = (IJunctionFeature)iEdgeFeat.FromJunctionFeature;
if (((IFeature)iJuncFeat).Shape.Equals(inFeature.Shape))

I wonder if this bypassing some edges.  

Could I get your sample data to test?  

0 Kudos
AlistairMcDougall1
Esri Contributor

Absolutely, should I send by email?

0 Kudos
MikeMillerGIS
Esri Frequent Contributor

yes, that works, mmiller@esri.com.  I am on vacation this and next week, so it might take me a while to review.  

0 Kudos