poISelectionSet SetDrawStyle

Sets a particular draw style on the current selection set.

Syntax

selectionSet_handle SetDrawStyledrawStyle

Application

HyperView Tcl Modify

Description

This command sets a particular draw style on the current selection set.

Inputs

drawStyle
A valid draw style is dependent on the selection set 'type'. To obtain a list of valid draw styles for the selection set, use the GetDrawStyleList command on the current selection set.

Example

To create selection sets of various types and also add items to them. In addition, this example will request the draw style list, change the draw style, and also change the visibility on the sets:
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]
puts “Current draw style: [element_set_handle GetDrawStyle]”
puts “Current draw size: [element_set_handle GetDrawSize]”
element_set_handle SetDrawStyle [lindex [element_set_handle GetDrawStyleList] 0]
element_set_handle SetVisibility true
# 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]
puts “Current draw style: [node_set_handle GetDrawStyle]”
puts “Current draw size: [node_set_handle GetDrawSize]”
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]
puts “Current draw style: [part_set_handle GetDrawStyle]”
puts “Current draw size: [part_set_handle GetDrawSize]”
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

Errors

This command returns zero (0) if a valid draw style is entered or a value greater than zero if an invalid draw style is entered (or if the selection set handle is invalid).