sonj

Script Attribute

Discussion created by sonj on Sep 9, 2011
Latest reply on Sep 16, 2011 by RAnderson-esristaff
Hi All,

Labels are displayed with expression for transformer featureclass accordingly we try to display labels in the schematic diagram but it shows Syntax error as a label. I have created four (FacilityID, RatedKVA, SubtypeCD,PhaseDesignation) field attributes and called these fields as parameters in the scr attribute. Below is the script and update where it is wrong.

Select Case SubtypeCD
  case 2,1
      Select Case PhaseDesignation
           case 4
                 FacilityID & vbCrLf & "1 - " & RatedKVA & "R"
           case 2
                 FacilityID & vbCrLf & "1 - " & RatedKVA & "W"
           case 1
                FacilityID & vbCrLf & "1 - " & RatedKVA & "B"
           case 0
                 FacilityID & vbCrLf & "1 - " & RatedKVA
       end select
  case 4
     FacilityID & vbCrLf & "3 - " & (int( RatedKVA /3)) &  "RWB"
  case 9
     FacilityID & vbCrLf & "2 - " & (int( RatedKVA /2))
  case 7
     FacilityID & vbCrLf & RatedKVA & "kVA"
end select

Regards
Johnson

Outcomes