*ME_ModuleOccurrenceInstancesSyncContents

Synchronizes the contents of one module occurrence to the specified target occurrences that share a common module prototype.

Syntax

*ME_ModuleOccurrenceInstancesSyncContents src_me_id target_me_ids ?options?

Type

HyperMesh Tcl Modify Command

Description

Every module occurrence has an associated module prototype. A single module prototype may provide the base definition for multiple module occurrences, that is, a prototype of a wheel, might have four occurrences in a vehicle.

This command synchronizes a single occurrence with one or more additional instanced occurrences of a common prototype. It will clear any current contents of the target occurrences and copy/synchronize the contents of the source occurrence into the targets.

Inputs

src_me_id
The ID of the source module which provides the content to be synchronized.
target_me_ids
The IDs of the target modules to receive the synchronized content (need to be enclosed in quotes if more than one ID is provided). Specifying a single value of 0 is a shortcut to target all other instanced occurrences that share a common prototype with src_me_id.
?options?
List of input options, passed as a comma separated string enclosed in quotes. Valid options are:
excluded_entity_types=<type1> <type2> ... <typeN>
A space separated list of module entity types to exclude from synchronization.
copy_partrep_status=<value>
0 - Do not update the current rep and mapped/loaded rep status of the target occurrences.
1 - Update the current rep and mapped/loaded rep status of the target occurrences to be same as source.
target_mode=<value>
If specified, the command will calculate the target parts ignoring anything specified in target_me_ids.
The options are:
1 – Same Representation. Syncs to instances with the same representation loaded.
2 – All Loaded. Syncs to instances with any representation loaded.
3 – Non-empty. Syncs to instances that have a content i.e. parts with content, but have not been loaded.
4 – All. Syncs to all instances.
target_outputmark=<value>
The ID of the user mark. Valid values are 1 or 2. If specified, the successfully synced parts will be placed on the specified user mark.

Examples

To synchronize the contents of module ID 22 to all other instanced occurrences that share a common module prototype. The affected synced occurrences that are calculated by the command will be placed on outputmark ID 1 for any post-processing:
*ME_ModuleOccurrenceInstancesSyncContents 22 “” “target_mode=4, target_outputmark=1”
To synchronize the contents of module ID 22 to specified target occurrences 24, 26 and 28. The operation will ignore copying/synchronizing properties and materials (to avoid duplicates) and will update the target occurrences’ rep statuses:
*ME_ModuleOccurrenceInstancesSyncContents 22 “24 26 28” "copy_partrep_status=1, excluded_entity_types=props mats"

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

2020.1