*CE_UpdateLink
Allows search and replace of an existing link in the specified connector with a new link entity.
Syntax
*CE_UpdateLink id search_type search_id search_name ?search_rule? ?replace_type? ?replace_id? ?replace_name? ?replace_rule? ?replace_state? ?keep_current_state? ?search_uid? ?replace_uid?
Type
HyperMesh Tcl Modify
Description
Allows search and replace of an existing link in the specified connector with a new link entity.
Inputs
- id
- The connector ID to update.
- 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_id
- The link entity ID to replace in the connector. The ID is optional only if one of the following is true:
- search_name
- The name of the link entity to replace in the connector. The name is optional only if one of the following is true:
- ?search_rule?
- The rule by which the link entity was added to the connector. The following codes define the different rules:
- ?replace_type?
- The type of entity that replaces the found link entity (search_type) in the connector. If not specified, the entity type information is not replaced for the found link (replace_type = search_type). The supported types are the same as that for search_type.
- ?replace_id?
- The entity ID that replaces the found link entity. If not specified, the entity ID information is not replaced for the found link (replace_id = search_id).
- ?replace_name?
- The entity Name that replaces the found link entity. If not specified, the entity name information is not replaced for the found link (replace_name = search_name).
- ?replace_rule?
- The rule to set for the found link entity. All the rules supported for search_rule parameters are supported.
- ?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:
- ?keep_current_state?
- Optional option to keep the current connector state after the update operation. Valid states are:
- ?search_uid?
- The UID of the link entity to replace in the connector. The UID is optional, only if search_rule is 1, 2, 3 or 4.
- ?replace_uid?
- The entity UID that replaces the found link entity. If not specified, the entity UID information is not replaced for the found link (replace_uid = search_uid).
Examples
*CE_UpdateLink 1 comps 10 "" 0 0 20 "" 0 0
*CE_UpdateLink 1 comps 0 "comp1" 0 0 0 "bumper" 0 0
*CE_UpdateLink 1 comps 10 "" 2 0 0 "" 3 0
*CE_UpdateLink 1 comps 10 "" 0 0 0 "" 0 2