*ME_ModuleOccurrencesLink

Links a set of module occurrences to a master module occurrence.

Syntax

*ME_ModuleOccurrencesLink master_id ids ?options?

Type

HyperMesh Tcl Modify Command

Description

Links a set of specified module occurrences to a master module occurrence to allow all of them to share the master occurrence’s underlying definition (including its prototype).

Every module occurrence in a model has an associated module prototype. A single module prototype may provide the base definition for multiple module occurrences, i.e. a prototype of a wheel might have four occurrences in a vehicle. In some models, the original model definition does not have this modelling structure and each module occurrence has its own prototype when they could share a common prototype definition. This command provides a method to link these similar module occurrences to obtain the desired instanced model structure.

When this command is applied to a list of occurrences, it will update the model structure, handle the cleanup of the discarded prototype definitions, and handle any matrix updates required by the specified options.

Inputs

master_id

The ID of the source module occurrence which provides the underlying definitions (i.e. the prototype) to be shared.
ids
The IDs of the module occurrences to be linked to the master module occurrence, within quotes if more than 1.
?options?
List of input options, passed as a comma separated string enclosed in quotes. Valid options are:
updatematrices=<value>
none - Do not update the structural matrices of the linked module occurrences (default)
calcoffset - Update the structural matrices for each linked module occurrences by calculating the offset in positions of the current contents of each linked module occurrence relative to the master module occurrence

Examples

To link the modules 24, 26 and 28 to share the definition of master module 22. As a result of the command, all of these modules will now share the same prototype and representations. In this operation, the matrices for the linked modules will be updated with any required offsets between each module and the master module:

*ME_ModuleOccurrencesLink 22 "24 26 28" "updatematrices=calcoffset"

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

2021