poISelectionSet SetColor

Sets the visibility color on the current selection set.

Syntax

selectionSet_handle SetColor color

Application

HyperView Tcl Modify

Description

This command sets the color for the visibility of the selection set. It affects the displaying/highlighting of a visible selection set and their possibly visible entity IDs.

Inputs

color
Either the RGB value of the color or the name of it (for example, SetColor β€œred”; SetColor β€œ255 0 0”).

Example

To create a selection set containing all nodes, make it visible in the graphic area, and use GetColor and SetColor for displaying the entities and their IDs in the defined color:
hwi OpenStack
hwi GetSessionHandle session_handle
session_handle GetProjectHandle project_handle
project_handle GetPageHandle page_handle [project_handle GetActivePage]
page_handle GetWindowHandle window_handle [page_handle GetActiveWindow]
window_handle GetClientHandle client_handle
client_handle GetModelHandle model_handle [client_handle GetActiveModel]
model_handle AddSelectionSet node
puts "Current selection sets: [model_handle GetSelectionSetList]\n"

model_handle GetSelectionSetHandle selection_set_handle 1
selection_set_handle SetLabel "OurNodeSelectionSet"
selection_set_handle Add all

puts "Current selection set ID: [selection_set_handle GetID]"
puts "   Label: [selection_set_handle GetLabel]"
puts "   Size:  [selection_set_handle GetSize] [selection_set_handle GetType]s"
puts "   Default color:      [selection_set_handle GetColor]"
puts "----------------------"

puts "   Set color to red:   "
selection_set_handle SetColor red
puts "Red = [selection_set_handle GetColor]"
selection_set_handle SetVisibility true
selection_set_handle SetColor "255 0 255"
selection_set_handle SetIDVisibility true

puts "   Setting an invalid color:   "
selection_set_handle SetColor "Today is Monday"
set errorMsg [session_handle GetError]
puts $errorMsg


hwi CloseStack

Errors

This command returns an error if the color argument is invalid. The error can be retrieved by using the GetError command on Session as shown in the example.