poIModel GetSelectionSetList
This command retrieves a list of all selection set IDs on the current model.
Syntax
model_handle GetSelectionSetList poolname
Application
HyperView Tcl Query
Description
This command retrieves a list of selection set IDs on the current model. Particular selection sets can be accessed with these IDs as keys.
Inputs
- poolname (Optional)
- The name of the set pool for which the ID list is requested.
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 id [model_handle AddSelectionSet component]
model_handle GetSelectionSetHandle selection_set_handle $id
selection_set_handle SetLabel "OurSelectionSet1"
selection_set_handle Add all
puts "SelectionSet: [selection_set_handle GetLabel] "
puts " [selection_set_handle GetSize] [selection_set_handle GetType]s"
selection_set_handle ReleaseHandle
set id2 [model_handle AddSelectionSet element]
model_handle GetSelectionSetHandle selection_set_handle $id2
selection_set_handle SetLabel "OurSelectionSet2"
selection_set_handle Add "id 1-100"
puts "SelectionSet: [selection_set_handle GetLabel] "
puts " [selection_set_handle GetSize] [selection_set_handle GetType]s"
selection_set_handle ReleaseHandle
set id3 [model_handle AddSelectionSet element]
model_handle GetSelectionSetHandle selection_set_handle $id3
selection_set_handle SetLabel "OurSelectionSet3"
selection_set_handle Add "selectionset == $id2"
puts "SelectionSet: [selection_set_handle GetLabel] "
puts " [selection_set_handle GetSize] [selection_set_handle GetType]s"
selection_set_handle ReleaseHandle
puts "Current Selection Sets: [model_handle GetSelectionSetList]"
model_handle RemoveSelectionSet $id
puts "Selection Set $id removed…"
puts "Current Selection Sets: [model_handle GetSelectionSetList]"
hwi CloseStack
Errors
This command does not return any errors.