*createentitysameas

Create a new entity that is a clone of a source entity.

Syntax

*createentitysameas entity_type entity_id ?entityname=<value>?

Type

HyperMesh Tcl Modify Command

Description

Create a new entity that is a clone of the original. Attributes and data names are both cloned, however, collected entities are not cloned along with collectors.

There are also a few limitations to this command:
  • Rigid wall entities are not supported.

Inputs

entity_type
Entity type to use as source.
entity_id
The ID of the source entity to clone.
entityname=<value>
The name of the new entity.

Examples

To duplicate the component with ID 100:
*createentitysameas comps 100
To duplicate the component with ID 100 with the new component named “comp01”:
*createentitysameas comps 100 entityname=comp01

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

13.0

2022 - Added optional input entityname.