hm_assemlist

Returns the hierarchical structure of assemblies, and optionally standalone components and multibodies, along with properties, materials, groups and beamsection collectors.

Syntax

hm_assemlist separator ?full_listing? ?append_entity_type? ?type_separator?

Type

HyperMesh Tcl Query Command

Description

Returns the hierarchical structure of assemblies, and optionally standalone components and multibodies, along with properties, materials, groups and beamsection collectors.

In the same way that a directory list is made up of separated sub-directories, the returned list consists of separated entity names.

If the output is not requested to include the entity type, any path that ends in the separator character represents an empty assembly.

Inputs

separator
The character used to separate the assemblies in the list.
full_listing
0 - Do not include components and multibodies not in assemblies, nor any materials, properties, beamsectcols and groups.
1 - Include components and multibodies not in assemblies, and all materials, properties, beamsectcols and groups.
This is optional. If not specified, a value of 0 is assumed.
append_entity_type
0 - Do not append the entity type to the entity output.
1 - Append the entity type to the entity output.
This is optional. If not specified, a value of 0 is assumed. If specified as 1, type_separator is mandatory.
type_separator
The character used to separate the entity type names in the list.
Only used if append_entity_type is 1.
For example: With ‘/’ as separator and ‘:’ as type_separator: the output might look like:
 /assemblies:assem1/assemblies:subassem1/components:comp1

Example

To find the hierarchy for the following structure of assemblies and components, using a separator of /:

hm_assemlist /

/wheel/base/Part1 /wheel/attachments/Part2 /head/Part3 /empty/

For the same example, include the full listing:

hm_assemlist / 1

/wheel/base/Part1 /wheel/attachments/Part2 /head/Part3 /empty/ /Part4

For the same example, include the full listing as well as the entity types, with a separator of %

hm_assemlist / 1 1 %

/assemblies%wheel/assemblies%base/components%Part1 /assemblies%wheel/assemblies%attachments/components%Part2 /assemblies%head/components%Part3 /assemblies%empty /components%Part4

Errors

Incorrect usage results in a Tcl error. To detect errors, you can use the catch command:
if { [ catch {command_name...} ] } {
   # Handle error
}