*CE_MarkUpdateLinkMark

Allows search and replace of existing links in the specified connectors with new link information.

Syntax

*CE_MarkUpdateLinkMark mark_id search_type search_mark_id replace_type replace_rule replace_state string_array number_of_strings ?keep_current_state?

Type

HyperMesh Tcl Modify

Description

Allows search and replace of existing links in the specified connectors with new link information.

Inputs

mark_id
Mark of connectors.
search_type
The entity type to search in the connector. This must be specified. The supported entities are comps, props, assems, surfs, tags, elems, nodes and parts.
search_mark_id
The ID of the mark containing the link entities to be updated.
replace_type
If specified with IDs/names/UIDs in the string_array, existing links in search_mark_id get replaced with the new information. The supported values are comps, props, assems, surfs, tags, elems, nodes and parts.
If specified with no IDs/names/UIDs in the string_array, existing links in search_mark_id get converted to the replace_type. The supported values are comps, props, and parts.
replace_rule
If specified with IDs/names/UIDs in the string_array, existing links in search_mark_id get replaced with the new information.
If specified with no IDs/names/UIDs in the string_array, existing links in search_mark_id get converted to the replace_rule.
The following codes define the different rules:
0 - Undefined
1 - None
2 - Use ID
3 - Use name
4 - Proximity
5 - Use UID
replace_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
string_array
A string array containing the list of new IDs/names/UIDs, created using *createstringarray. This must be set to 1.
The strings are generally IDs/names/UIDs based on the replace_rule.
number_of_strings
The number of strings in string_array.
?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
At most, one of the "replace" data must be specified to see a change in the link attributes. If the replace data exactly matches the search data, the connector is not unrealized and no change is made to the link entity.

Example

To convert component links 1-10 to part links across all displayed connectors:

*createmark connectors 1 "displayed"
*createmark components 2 "by id only" 1-10
*CE_MarkUpdateLinkMark 1 comps 2 parts 0 0 1 0 0

To convert link rule for component links 1-10 to “use-name” across all displayed connectors:

*createmark connectors 1 "displayed"
*createmark components 2 "by id only" 1-10
*CE_MarkUpdateLinkMark 1 comps 2 comps 3 0 1 0 0

To convert link state for component links 1-10 to “geom” across all displayed connectors:

*createmark connectors 1 "displayed"
*createmark components 2 "by id only" 1-10
*CE_MarkUpdateLinkMark 1 comps 2 comps 0 2 1 0 0

To replace component 1 with component group (2 and 3) across all displayed connectors:

*createmark connectors 1 "displayed"
*createmark components 2 "by id only" 1
*createstringarray 2 "2" "3"
*CE_MarkUpdateLinkMark 1 comps 2 comps 2 0 1 2 0

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

2017.2