*updatestackedentities

Stacks composites entities in a hierarchy.

Syntax

*updatestackedentities ?option1=<value1>? ?option2=<value2>? ... ?optionN=<valueN>?

Type

HyperMesh Tcl Modify Command

Description

This command updates the hierarchy of composite entities. It can be used to stack plies under sequences and laminates, sequences under laminates and sublaminates under interface laminates. It can also be used to unstack any child entities.

Inputs

entitytype=<value>
The entity type of the parent or target stack entity. If method argument is present, this is the parent entity type. Otherwise, this is a target from which the appropriate parent will be determined. If the specified type is a ply, sequence or laminate entity, the children in entitylist will be handled for stacking. Otherwise, the children in entitylist will be unstacked from their current parent.
id=<value>
The ID of the single parent or target stack entity. If method argument is present, this is the parent entity type. Otherwise, this is a target from which the appropriate parent will be determined.
entitylist=<<entitytype1>={id1 id2 … idN} <entitytypeN>={id1 id2 … idN}>
List of child entities to be stacked or unstacked. Plies and sequences are accepted are valid entity types. Ids can be passed as a single value or as a list for the given type. N entitytype={ids} pairs can be passed.
method=<value>
Specifies method in which entitylist children should be stacked. If method argument is present, entitytype and id arguments above specify the parent stack entity. Otherwise, entitytype and id arguments specify a target stack entity, where the command will internally determine the appropriate parent (for example, if target is stacked ply, the parent laminate will be used as parent).
replace – Current children of parent will be unstacked and replaced by incoming children in entitylist.
insert – Incoming children in entitylist will be stacked at the specified index of the current stack.
append – Incoming children in entitylist will be appended to the current stack.
remove – Incoming children in entitylist will be removed, if present, from the current stack.
index=<value>
The index of the stack parent incoming children in entitylist will be stacked if method=insert. 0 specifies the top of the stack.
reorderinputbyindex=<value>
If true, reorders incoming children in entitylist such that they are ordered in the same way as displayed in the current browser. Otherwise, children are stacked in exactly the order specified in entitylist. Default is false.

Examples

Append plies 5, 6, 7, 8 into parent laminate with ID 1:
*updatestackedentities entitytype=laminate id=1 entitylist="plies={5 6 7 8}" method=append
#Ply ids in laminate 1 before stacking: 1 2 3 4
#Ply ids in laminate 1 after stacking: 1 2 3 4 5 6 7 8
Insert plies 5, 6, 7, 8 into parent laminate with ID 1 at index 1:
*updatestackedentities entitytype=laminate id=1 entitylist="plies={5 6 7 8}" method=insert index=1
#Ply ids in laminate 1 before stacking: 1 2 3 4
#Ply ids in laminate 1 after stacking: 1 5 6 7 8 2 3 4
Stack plies at ply target:
*updatestackedentities entitytype=plies id=2 entitylist="plies={5 6 7 8}"
#Ply ids in laminate 1 before stacking: 1 2 3 4
#Ply ids in laminate 1 after stacking: 1 2 5 6 7 8 3 4
Unstack all plies from laminate ID 1:
*updatestackedentities entitytype=laminate id=1 entitylist="" method=replace
#Ply ids in laminate 1 before stacking: 1 2 3 4 5 6 7 8
#Ply ids in laminate 1 after stacking: {}
Unstack plies 1, 3, 6, 7 from laminate ID 1:
*updatestackedentities entitytype=laminate id=1 entitylist="plies={1 3 6 7}" method=remove
#Ply ids in laminate 1 before stacking: 1 2 3 4 5 6 7 8
#Ply ids in laminate 1 after stacking: 2 4 5 8
Stack combination of plies and sequences in laminate parent:
*updatestackedentities entitytype=laminate id=1 entitylist="sequences=6 plies={5 6 7 8} sequences=7" method=append
Stack plies 9, 10 in sequence ID 1:
*updatestackedentities entitytype=sequences id=1 entitylist="plies={9 10}"
Stack sublaminates 2, 3 in interface laminate ID 1:
*updatestackedentities entitytype=laminate id=1 entitylist="laminates={2 3}"

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

2024