*replacentitywithentitymark
Replaces multiple components.
Syntax
*replacentitywithentitymark mode existing_component_mark incoming_component_mark string_array number_of_strings
Type
HyperMesh Tcl Modify Command
Description
This command replaces multiple components.
Inputs
- mode
- The replace mode. Valid values are:
- 0 - Undo/reject replace operation.
- 1 - Initial replace operation.
- 2 - Finish/accept replace operation.
- existing_component_mark
- The ID of the mark containing the existing/old components.
- incoming_component_mark
- The ID of the mark containing the incoming/new components.
- string_array
- The ID of the string array that contains the input options. The string array is created using the *createstringarray command. This should always be set to 1.
- number_of_strings
- Integer indicating the size (number of strings) in the string array created using *createstringarray.
Example
To replace components 301 and 302 with 501 and 502 respectively:
*createmark comps 1 301 302
*replacesetentitydata componentmark=1
*createmark sets 1 20 30
*createmark groups 1 20 30
*replacesetentitydata preservemark=1 incomingonlyentities={sets groups} componentpairingstring={{301 501} {302 502}}
*createstringarray 4 "tolerance=0.5" "keep_src_prop=1" "keep_src_mat=1" "keep_src_comp_cardimage=1"
*createmark comps 1 301 302
*createmark comps 2 501 502
*replacentitywithentitymark 1 1 2 1 4
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