Select to view content in your preferred language

Using trace configurations in attribute rules

2213
13
Jump to solution
04-24-2022 02:58 PM
PierreloupDucroix
Frequent Contributor

Hi,

I want to automatically set an attribute, based on a trace, to every feature created in a utility network.

Example : I want every line created downstream a circuit breaker feeder, to have the name of this feeder affected in a specific attribute.  I have a subnetwork controller which is not my feeder but the transformer in the station. Then I want to trace upstream in the subnetwork, get the first feeder and get its name when I create a cable.

PierreloupDucroix_0-1650837190436.png

Is this possible using attribute rules ? If not, is there another way to do it ?

I first thought about using attribute propagation, but it only works with numerical values and not text. So I don't think it is easily applicable here, neither made for this purpose.

Thanks

1 Solution

Accepted Solutions
JonathanDaweEsriUK
Occasional Contributor

 

Hi @PierreloupDucroix , your workflow bears resemblance to a batch trace workflow described here.

I'm wondering whether you could create a geoprocessing model which runs a batch trace and then processes the result to store information on the assets identified. 

https://github.com/Esri/Utility-Data-Management-Support-Tools#batch-trace

View solution in original post

0 Kudos
13 Replies
JonathanDaweEsriUK
Occasional Contributor

 

Hi @PierreloupDucroix , your workflow bears resemblance to a batch trace workflow described here.

I'm wondering whether you could create a geoprocessing model which runs a batch trace and then processes the result to store information on the assets identified. 

https://github.com/Esri/Utility-Data-Management-Support-Tools#batch-trace

0 Kudos
PierreloupDucroix
Frequent Contributor

Hi, thanks, it looks indeed like what I want to do.

Not sure, reading the documentation, if I can use a text attribute from the result of the trace, as the summary information... But the skip_calc_on_start option does exactly what I want, updating the feature the starting point is coming from.

This will need further testing, but I think it will do the job.

Hope in a near future we would be able to trace directly in the arcade language.

0 Kudos
MikeMillerGIS
Esri Frequent Contributor

The batch trace has the option to store the raw summary results on the starting points.  You may have to parse and clean them up, then if you want to store them on downstream features, run another batch trace to push them down.

 

0 Kudos
PierreloupDucroix
Frequent Contributor

Hello @MikeMillerGIS ,

after a long time, I finally managed to test batch tracing.

So far, I created a modelBuilder that does the following steps :

- from a selected cable, I first run a "Build stating points" tool, to find the nearest upstream circuit breaker.

- I append the result to an existing feature class, similar to the StartingPoints feature class, where I added a "circuitBreaker" field.

- I calculate this field, with an arcade expression, returning the circuit breaker name from the UN feature class, to my new StartingPoints layer.

- Lastly, I run a "Batch trace" to update every cable downstream to the circuit breaker, and I want to update the field CBName ('depart' in french), with the circuit breaker name that I calculated previously.

This is where it doesn't work, I have this error when running the batch trace : "Casefold does not exist"

Traceback (most recent call last):
File "<string>", line 30, in <module>
File "D:\...\Toolboxes\20221017_Utility-Data-Management-Support-Tools-2.9\UtilityDataManagementSupport.atbx\udms\esri.py", line 111, in wrapper
File "D:\...\Toolboxes\20221017_Utility-Data-Management-Support-Tools-2.9\UtilityDataManagementSupport.atbx\udms\logic\__init__.py", line 126, in batch_trace
File "D:\...\Toolboxes\20221017_Utility-Data-Management-Support-Tools-2.9\UtilityDataManagementSupport.atbx\udms\logic\trace.py", line 193, in __init__
other_calledfuncs = other.calledfuncs
File "D:\...\Toolboxes\20221017_Utility-Data-Management-Support-Tools-2.9\UtilityDataManagementSupport.atbx\udms\logic\trace.py", line 193, in <listcomp>
other_calledfuncs = other.calledfuncs
AttributeError: ValueObject : obtention d’attribut : casefold n’existe pas

 

The trace I use is working when using the 'selection' option, it returns only cable features that have a CBName field. But not with the 'calculate' option...

Do you know how I can solve this ?

PierreloupDucroix_0-1666000390060.png

 

0 Kudos
MikeMillerGIS
Esri Frequent Contributor

What version of the tools are you using?  The properties of the toolbox should have it in the description?  I reviewed the code and unsure why this is occurring.

0 Kudos
PierreloupDucroix
Frequent Contributor

Version 2.9.0.2

0 Kudos
MikeMillerGIS
Esri Frequent Contributor

Can you ensure you do not have an older version of the tool on your system.  Our only guess is that it is loading a module from an older version of the toolbox.  Your stack trace references a function that does not exist anymore.

0 Kudos
PierreloupDucroix
Frequent Contributor

I downloaded again the 2.9.1 version of the toolbox, and still have the same error :

This is the new stack trace :

Traceback (most recent call last):
File "<string>", line 30, in <module>
File "D:\...\Toolboxes\20221021_UtilityDataManagementSupport_v291.atbx\udms\esri.py", line 118, in wrapper
File "D:\...\Toolboxes\20221021_UtilityDataManagementSupport_v291.atbx\udms\logic\__init__.py", line 158, in batch_trace
File "D:\...\Toolboxes\20221021_UtilityDataManagementSupport_v291.atbx\udms\logic\trace.py", line 195, in __init__
File "D:\...\Toolboxes\20221021_UtilityDataManagementSupport_v291.atbx\udms\logic\trace.py", line 195, in <listcomp>
AttributeError: ValueObject : obtention d’attribut : casefold n’existe pas

Note that I removed other version of the toolbox, and even uninstall/reinstall ArcGIS Pro 2.9.5

I also tried in a new, blank project, to load my UN service, and run the batch trace... Same result

Thank you

0 Kudos
MikeMillerGIS
Esri Frequent Contributor

Calculate is working for my test.  Are you using services, fgdb or mobilegdb?  Could you zip up the project so I can test?  

0 Kudos