Select to view content in your preferred language

Lable Expression for relationship featureclasss

2895
1
11-24-2015 11:29 AM
LarryAdgate
Regular Contributor

This label expression below works along with a relationship class attachment linked to a line feature class. It only works great when the Domain setup for the Field "DIAMETER" does not include an inch the character. My domain for "DIAMETER" currently reads: 2,3,4&6 but it needs to be corrected to read 2",3"4" & 6". When applying the inch character(") to the domain the script errors. Can someone help me with this?

Thanks,

Larry

Function FindLabel (  [DIAMETER] , [LINETYPE] )

FindLabel = ""

if [DIAMETER]  AND [LINETYPE] = "Fire Service" then

FindLabel  = [DIAMETER]  & "" & "FS"

end if

if [DIAMETER]  AND [LINETYPE] = "Domestic" then

if FindLabel   = "" then

FindLabel  = [DIAMETER]  & "" & "DS"

end if

end if

if [DIAMETER]  AND [LINETYPE] = "Irrigation" then

if FindLabel   = "" then

FindLabel  = [DIAMETER]  & "" & "IRR"

end if

end if

if [DIAMETER]  AND [LINETYPE] = "Air Valve" then

if FindLabel   = "" then

FindLabel  = [DIAMETER]  & "" & "AV"

end if

end if

if [DIAMETER]  AND [LINETYPE] = "Sampling Station" then

if FindLabel   = "" then

FindLabel  = [DIAMETER]  & "" & "SS"

end if

end if

End Function

0 Kudos
1 Reply
m_neer
by
Frequent Contributor

I had asked something similar in maybe this will help you?

Re: Double Quote in Label Expression

0 Kudos