How to read the units of the attribute value from the table

235
3
02-19-2024 01:40 AM
VikasGanesh
New Contributor II

Hi Team,

I have written small .Net commandline tool to read the data from utility network gdb file using ArcGIS Core host dll. below is the code snippet to read the particular field value from the row. 
Example i am reading the operating voltage value from the table (ElectricLine), but it is returning the value without units. For example in ArcGIS pro tool I can able to see the operating voltage with the units 11KV or 400V, but when I read through the code I always get as 11 or 400. So how to read the units also, similar to what we see in the Arcgis pro tool.

Any suggestion or code snippet will be very helpful.

VikasGanesh_1-1708335484327.png

 

VikasGanesh_0-1708335290132.png

 

0 Kudos
3 Replies
JohnAlsup
Esri Contributor

this goes to modeling technique.  In our electric foundation solution, you will notice that units for Voltage are in Volts, not k or m volts.  This means when you pull back the values, they are always in the same units, volts.  We used the same technique for Volt Amps (VA) and Volta Amps Reactive (VAR).  Otherwise you will need to evaluate the asset group and asset type in your code. 

John Alsup
jalsup@esri.com
0 Kudos
RobertKrisher
Esri Regular Contributor

@JohnAlsup By 'evaluate the asset group and asset type' in your code, do you mean you'll need to use the asset group of the feature to find the corresponding domain from the field on the subtype?

0 Kudos
JohnAlsup
Esri Contributor

Hi @RobertKrisher , yes you would need to use code in the SDK similar to ProSnippets Geodatabase · Esri/arcgis-pro-sdk Wiki · GitHub to get the domain assigned to the subtype (asset group) and then you may need to evaluate the asset type if you are using a combined voltage field.  As there is no phase to phase voltage to a single phase line.  This is why in our Electric Foundation model we provide two fields, one for phase to phase voltage and another for phase to neutral voltage. 

John Alsup
jalsup@esri.com
0 Kudos