poISelectionSet GetDrawStyleList
Gets a list of valid draw styles for the current selection set.
Syntax
selectionSet_handle GetDrawStyleList
Application
HyperView Tcl Query
Description
This command returns a list of the valid draw styles on the current selection set. Valid draw styles are dependent on the 'type' of the selection set. For example, a 'Node' type selection set will have different draw styles than a 'Part' type selection set.
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]
# create a selection set of type Element containing all visible elements
set element_set_id [model_handle AddSelectionSet element]
model_handle GetSelectionSetHandle element_set_handle $element_set_id
element_set_handle SetLabel "OurElementSelectionSet"
element_set_handle Add all
puts [element_set_handle GetDrawStyleList]
element_set_handle SetDrawStyle [lindex [element_set_handle GetDrawStyleList] 0]
element_set_handle SetVisibility true
# now please check the graphics area and move the model
element_set_handle SetVisibility false
# create a selection set of type Node containing all visible nodes
set node_set_id [model_handle AddSelectionSet node]
model_handle GetSelectionSetHandle node_set_handle $node_set_id
node_set_handle SetLabel "OurNodeSelectionSet"
node_set_handle Add all
puts [node_set_handle GetDrawStyleList]
node_set_handle SetDrawStyle [lindex [node_set_handle GetDrawStyleList] 0]
node_set_handle SetVisibility true
# check the graphics area and move the model
node_set_handle SetVisibility false
# create a selection set of type Part containing all visible Parts
set part_set_id [model_handle AddSelectionSet part]
model_handle GetSelectionSetHandle part_set_handle $part_set_id
part_set_handle SetLabel "OurPartSelectionSet"
part_set_handle Add all
puts [part_set_handle GetDrawStyleList]
part_set_handle SetDrawStyle [lindex [part_set_handle GetDrawStyleList] 0]
part_set_handle SetVisibility true
# check the graphics area and move the model
part_set_handle SetVisibility false
hwi CloseStack
Error
This command should not return any errors. In the case of previous errors, this command may return an empty list.