VoltageColors

<< Click to Display Table of Contents >>

 

VoltageColors

Link This property returns an object that allows configuring Colors of Voltage levels by script. Colors of Voltage levels are available on the Voltages tab of the Power Configuration. To use the object returned by this property at run time users must deactivate the Power Configuration object before changing its properties, according to the next example.

Set pc = Application.GetObject("PowerConfiguration")
Set vc = pc.VoltageColors
pc.Deactivate
'Adds three new base voltages
Set v1 = vc.AddVoltage(593)
vc.AddVoltage 594, RGB(254, 128, 96)
vc.AddVoltage 595, RGB(254, 128, 96), False, RGB(1, 2, 3)
'Removes two base voltages just created
vc.DeleteVoltage 593
vc.DeleteVoltage 595
'Traverses and changes the existing base voltages
For Each v In vc
  If v.NominalVoltage <> 0 Then v.NominalVoltage = i * 50.0
  v.ColorEnergized = RGB(i * 31, i * 16, 32)
  v.FollowEnergized = False
  v.ColorDeEnergized = RGB(128, 0, i * 16)
  i = i + 1
Next
pc.Activate

 

NOTE

Please check topic Voltage Colors for more information about the properties of the object returned by this property.

Was this page useful?