Electric Utility.
We depict transformers as a single symbol. There could be one, two or three transformers at that location.
I would like to label all the sizes at that location along with their phase designation.
(i.e. A:25
B:25
C:25)
The phase designation is within the attribute data but the sizes are in a domain.
How would you get the domain values to appear in the label when displayed?
Solved! Go to Solution.
Here is the code I use to label transformers. If there are multiple transformers at a single location I use a semicolon to separate them in the BankKva attribute field, for example and AC phase transformer bank could be 25;0;50 and would display as A-25;C-50.
Function FindLabel ( [PhaseCode], [BankKva] )
dim kva
kva = [PhaseCode]
if kva = "AB" then
FindLabel = "A-" & split([BankKva],";")(0)&";"& "B-" & split([BankKva],";")(1)
elseif kva = "AC" then
FindLabel = "A-" & split([BankKva],";")(0)&";"& "C-" & split([BankKva],";")(2)
elseif kva = "BC" then
FindLabel = "B-" & split([BankKva],";")(1)&";"& "C-" & split([BankKva],";")(2)
else
FindLabel = kva & "-" & [BankKva]
end if
End Function
Here is the code I use to label transformers. If there are multiple transformers at a single location I use a semicolon to separate them in the BankKva attribute field, for example and AC phase transformer bank could be 25;0;50 and would display as A-25;C-50.
Function FindLabel ( [PhaseCode], [BankKva] )
dim kva
kva = [PhaseCode]
if kva = "AB" then
FindLabel = "A-" & split([BankKva],";")(0)&";"& "B-" & split([BankKva],";")(1)
elseif kva = "AC" then
FindLabel = "A-" & split([BankKva],";")(0)&";"& "C-" & split([BankKva],";")(2)
elseif kva = "BC" then
FindLabel = "B-" & split([BankKva],";")(1)&";"& "C-" & split([BankKva],";")(2)
else
FindLabel = kva & "-" & [BankKva]
end if
End Function