poIModel ChangeSelectionSetType

Changes the type of the current selection set with respect to the selection set entity binding.

Syntax

model_handle ChangeSelectionSetType id type

Application

HyperView Tcl Modify

Description

This command changes the type of the selection set and takes care of the entity binding. The type is determined when creating a new selection set using the command poIModel AddSelectionSet. If the type needs to be changed, all the entities need to change, too. Type can either be node, element, part, system or assembly. Id is the current selection set ID.

Inputs

id
The ID of the selection set on which you want to perform a type change.
type
The type to which the selection set should be changed.

Example

To create a component selection set, including entities, and changes the type on it:
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 "OurSelectionSet"
selection_set_handle Add all
selection_set_handle SetVisibility true

puts "Current selection set ID: [selection_set_handle GetID]"
puts "   Label: [selection_set_handle GetLabel]"
puts "   Size:  [selection_set_handle GetSize] [selection_set_handle GetType]s"
puts "----------------------"

selection_set_handle ReleaseHandle

model_handle ChangeSelectionSetType $id elements

model_handle GetSelectionSetHandle selection_set_handle $id
puts "After type change------"
puts "Current selection set ID: [selection_set_handle GetID]"
puts "   Label: [selection_set_handle GetLabel]"
puts "   Size:  [selection_set_handle GetSize] [selection_set_handle GetType]s"
puts "----------------------"

hwi CloseStack

Errors

This command returns 0 (zero) on success, or HW_InvalidHandle if the selection set handle is invalid.