*ME_ModuleOccurrencesCreateByAssemblyMark

Creates parts and part assemblies for given legacy assemblies.

Syntax

*ME_ModuleOccurrencesCreateByAssemblyMark mark_id "?parent_id=<value>? ?mark_delete=<value>? ?new_part_creation=<value>? ?resolve_conflicts=<value>?"

Type

HyperMesh Tcl Modify Command

Description

Creates parts and part assemblies for given legacy assemblies, mimicking the assembly hierarchy of the input mark. Each assembly component will be associated to the new parts (using a name based UID rule) and each legacy assembly will be associated to the new part assembly, maintaining a similar hierarchy. Legacy assemblies can be deleted afterwards.

An option to resolve conflicting hierarchy is available. This situation occurs for the parts with multiple components. When two components lie in different assemblies and while mapping assemblies to part assemblies, subsequent part assemblies or conflicting parts will be empty based on the user choice. This conflicting situation is resolved by creating a part for each component and deleting the original part (if empty).

It has an option to create a new part for a component or reorganize the old part into the hierarchy.

Inputs

mark_id
The ID of the mark containing the legacy assemblies. Valid values are 1 and 2.
parent_id=<value>
The ID of the parent part assembly or root part. The root part is used by default.
mark_delete=<value>
The flag to delete the legacy assemblies after migration.
0 - Do not delete legacy assemblies after migration. (default)
1 - Delete legacy assemblies after migration.
new_part_creation=<value>
The flag to create a new part for a component or reorganize old part in the hierarchy.
0 – Reorganize old parts into the part assembly hierarchy. Do not create new parts for components. (default)
1 – Do not use old parts. Create new parts for components in the part assembly hierarchy.
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.

Examples

To convert the legacy assemblies with IDs 7, 8, and 9, use part assembly ID 4 as the parent part and delete the legacy assemblies afterwards:
*createmark assem 1 7 8 9
*ME_ModuleOccurrencesCreateByAssemblyMark 1 "parent_id=4 mark_delete=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

2022.1

2025.1 - Added new optional arguments new_part_creation and resolve_conflicts.