*CE_ConvertLinksByMark

Converts connector links to a new entity type.

Syntax

*CE_ConvertLinksByMark mark_id target_entity_type link_index ?target_link_rule? ?target_link_state? ?keep_current_state?

Type

HyperMesh Tcl Modify

Description

Converts connector links to a new entity type.

Inputs

mark_id
The ID of the mark containing the connectors to update. Valid values are 1 and 2.
target_entity_type
The entity type to which the link is converted. Valid values are:
comps
props
parts
link_index
The index of the link to be converted, starting from 0.
-1 - all links are converted
?target_link_rule?
The optional rule to set for the converted link entity. Valid rules are:
0 - Undefined
1 - None
2 - Use ID
3 - Use name
4 - Proximity
5 - Use UID
?target_link_state?
The flag to set for the link entity that specifies if you are connecting to mesh or to geometry. The supported values are:
0 - Undefined
1 - Connect to mesh
2 - Connect to geometry
?keep_current_state?
Optional option to keep the current connector state after the update operation. Valid states are:
0 - Unrealize if needed (default)
1 - Keep current state

Examples

To convert all displayed connectors at link index 0 to part links:
*createmark connectors 1 displayed
*CE_ConvertLinksByMark 1 parts 0
To convert all links of connector 3 to part links:
*createmark connectors 1 3
*CE_ConvertLinksByMark 1 parts -1
To convert all links of displayed connectors to part links using the UID rule:
*createmark connectors 1 displayed
*CE_ConvertLinksByMark 1 parts -1 5

Errors

Incorrect usage results in a Tcl error. To detect errors, you can use the catch command:
if { [ catch {command_name...} ] } {
   # Handle error
}

Version History

14.0

2017.2 – Added new optional arguments target_link_rule, target_link_state and keep_current_state.