poISelectionSet GetType

Retrieves the current data type for the selection set.

Syntax

selectionSet_handle GetType

Application

HyperView Tcl Query

Description

This command returns the current type of the selection set. Type can be node, element, part, system, or assembly. The type is determined when creating a new selection set using the command AddSelectionSet on Model, for instance. If the selection set is invalid, this command returns 0.

Example

To create a selection set containing all nodes, make it visible in the graphic area, and use Get-functions to retrieve the current settings:
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 "   Type:  [selection_set_handle GetType] "
puts "   Size:  [selection_set_handle GetSize] [selection_set_handle GetType]s"
puts "   Default color:      [selection_set_handle GetColor]"
puts "   Default visibility: [selection_set_handle GetVisibility]"
puts "----------------------"

selection_set_handle SetVisibility true
puts "   Current visibility: [selection_set_handle GetVisibility]"
hwi CloseStack

Error

This command should always return a valid type as long as a valid selection set handle is used. If the selection set handle is not retrievable, this command returns 0.