*ME_PartsetCreateByAssemblyMark

Creates part sets for legacy assemblies, and parts for orphan components.

Syntax

*ME_PartsetCreateByAssemblyMark mark_id "?parent_partsetid=<value>? ?root_assemblyonly=<value>? ?resolve_conflicts=<value>? ?skip_mapped=<value>? ?flat_modules=<value>?"

Type

HyperMesh Tcl Modify Command

Description

Creates a part set per legacy assembly, imitating the legacy assembly hierarchy of the input mark in part set browser. It will also create parts for orphan components which lie directly under the root model under legacy assemblies.

An option to resolve conflicting hierarchy is available. This situation occurs for the parts with multiple components. When two components lie in different assemblies, mapping assemblies to part sets with the same part under different part sets gives you the wrong perception of assembly hierarchy. This conflicting situation is resolved by creating a part for each component and deleting the original part (if empty).

This command has an option to create nested or flat part hierarchy in the Part browser for orphan components under legacy assembly. Nested hierarchy option acts in a similar way to the "Create Parts" option on solver deck import. Flat part hierarchy results in all newly created parts for orphan components being placed directly under the root model in the Part browser.

Inputs

mark_id
The ID of the mark containing the legacy assemblies. Valid values are 1 and 2.
parent_partsetid=<value>
The valid ID of the existing part set under which you want to imitate the legacy assembly hierarchy with part set per legacy assembly. Default value is 0.
root_assemblyonly=<value>
The flag to convert or map root assemblies only. Leaf assemblies will be filtered out.
0 - Convert or map all legacy assemblies on mark. (default)
1 - Filter out leaf assemblies. Keep root assemblies (the assemblies with no parent assembly) only to convert or map.
resolve_conflicts=<value>
The flag to resolve conflicts in part and legacy assembly hierarchy.
0 - Do not resolve conflicts in hierarchy. (default)
1 - Resolve conflicts in hierarchy by creating a new part per conflicting component.
skip_mapped=<value>
The flag to skip already converted or mapped legacy assembly to part set.
0 - Map all legacy assemblies by creating a part set per legacy assembly.
1 - Skip already mapped legacy assemblies to avoid duplicate creation of a part set per legacy assembly. (default)
flat_modules=<value>
The flag to create nested or flat parts hierarchy (for orphan components) in the part browser.
0 - Do not create flat parts hierarchy (for orphan components) under root model in the part browser. Creates nested hierarchy.
1 - Create flat parts hierarchy under root model. All newly created parts will be placed under a root model. (default)
parts_allorphancomps=<value>
The flag to create parts for all the orphan components in the model.
0 - Do not create parts for all the components in the model. Consider components which are under selected assemblies only. (default)
1 - Create parts for all the orphan components in the model.

Examples

To map/convert all legacy assemblies with IDs 7, 8, and 9 under existing part set with ID 1 and skip already mapped assemblies to Part sets with flat parts hierarchy.
*createmark assem 1 7 8 9
*ME_PartsetCreateByAssemblyMark 1 "parent_partsetid=1 skip_mapped=1 flat_modules=1"

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

2025.1