*replacenodes
Replaces single or multiple nodes simultaneously with a single command.
Syntax
*replacenodes ?option1=<value1>? ?option2=<value2>? ... ?optionN=<valueN>?
Type
HyperMesh Tcl Modify Command
Description
This command replaces single or multiple nodes simultaneously with a single command.
Inputs
- <source_type>=<selection>
- The source entity or entities. There are several ways to provide the source entities.
Only one option can be used at a time:
- source_node=<id>
- The ID of the source node to be replaced.
- source_list=<list_id>
- The ID of the list containing the source nodes.
- <target_type>=<selection>
- The target entity or entities. There are several ways to provide the target entities.
Only one option can be used at a time:
- target_node=<id>
- The ID of the target node to be replaced with.
- target_list=<list_id>
- The ID of the list containing the target nodes.
- equiv=<value>
- The equivalence option.
- midpoint=<value>
- The location option.
- collapse_check=<value>
- The option to check element collapsing.
Example
To replace the source nodes ID 1, 2, and 3 to target nodes ID 4, 5, and 6 with only target nodes remaining and replace nodes without warning:
*createlist nodes 1 1 2 3
*createlist nodes 2 4 5 6
*replacenodes source_list=1 target_list=2 equiv=1 midpoint=0 collapse_check=2
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
2023.1 - Updated the syntax to support name-value argument pairs and added new option collapse_check.