*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 Command
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.
- replace_rule
- If specified with IDs/names/UIDs in the string_array, existing links in search_mark_id get replaced with the new information.
- 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:
- string_array
- A string array containing the list of new IDs/names/UIDs, created using *createstringarray. This must be set to 1.
- 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:
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
if { [ catch {command_name...} ] } {
# Handle error
}
Version History
2017.2