poISelectionSet SetSelectMode
Sets the selection mode of the selection set.
Syntax
selectionSet_handle SetSelectionMode mode
Application
HyperView Tcl Modify
Description
This command sets the selection mode for the selection set.
Inputs
- mode
- One of the possibilities listed by using GetSelectionModeList on the selection set. It can either be true if the selection set should be displayed highlighted, or false if it should not be highlighted.
Example
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]
set selection_set_id [model_handle AddSelectionSet node]
model_handle GetSelectionSetHandle selection_set_handle $selection_set_id
selection_set_handle SetLabel "OurNodeSelectionSet"
selection_set_handle SetVisibility true
puts "Current SelectionMode: [selection_set_handle GetSelectMode]"
puts "SelectModeList: [selection_set_handle GetSelectModeList]"
selection_set_handle SetSelectMode all
puts "Size using SelectMode all: [selection_set_handle GetSize] [selection_set_handle GetType]s"
selection_set_handle Clear
#hide part of the model using the model browser now
selection_set_handle SetSelectMode displayed
set errorMsg [ session_handle GetError]
if {$errorMsg != ""} {
puts $errorMsg
} {
puts "Size using SelectMode displayed: [selection_set_handle GetSize] [selection_set_handle GetType]s"
}
hwi CloseStack
Errors
This command returns an error if the argument mode is invalid. To obtain the error information use GetError on the Session object as shown in the example.