Documentation Center

  • Trial Software
  • Product Updates

Retranslate CAD Assembly

Associativity and Updating

To update an existing generated SimMechanics™ model with changes to its original external definition (a CAD assembly, for example), the intermediate Physical Modeling XML file and the model itself must retain information about the identities of at least some of its components. This section explains this "identity memory" or associativity.

What Is Associativity?

Associativity is a key concept for understanding the relationship between CAD assemblies and SimMechanics models based on them, and the export and updating process that defines SimMechanics models from CAD assemblies.

Associativity Between CAD Assemblies and SimMechanics Models

Associativity is a persistent (session-independent) parallel relationship among certain components of a CAD assembly, Physical Modeling XML files exported from it, and SimMechanics models generated from the XML files.

This relationship preserves the identities and parallelisms of certain CAD components and the corresponding imported components of the SimMechanics model. The SimMechanics Link exporter defines these unique identities from the CAD assembly components and embeds them in the exported Physical Modeling XML file. SimMechanics models generated from the XML file in turn retain these identities.

You actualize associativity when you generate a SimMechanics model from a CAD assembly. Associativity is a mapping between parts, constraints, and subassemblies in a CAD assembly and the corresponding Body and Joint blocks, coordinate systems, and subsystems in the SimMechanics model generated from that CAD assembly. It uniquely captures the identities of these CAD components, their corresponding blocks, and their topology (how they are connected to one another).

Associativity is not completely symmetric between the CAD and SimMechanics worlds, because the translation process moves in one direction only, from CAD assembly to generated SimMechanics model.

When and Why You Need Associativity

Associativity is required for updating a generated SimMechanics model when its originating CAD assembly has been changed.

How Associativity Is Implemented

When you use the SimMechanics Link exporter to create a Physical Modeling XML file from a CAD assembly, these components receive unique XML identifiers. When you use the SimMechanics importer to generate a SimMechanics model from the XML file, the identifiers are preserved in the corresponding SimMechanics model features.

Parallel Identities Between CAD Assembly and SimMechanics Model Components Captured by Associativity

CAD Assembly ComponentsCorresponding Imported SimMechanics Model Components
Parts and groundsBody and Ground blocks
Constraints between parts
(allowed motions)
Joint blocks
Constraints between parts
(positions and orientations)
Paired coordinate systems attached to Joints
Reference coordinate systemsBody coordinate systems unattached after import
Subassembly hierarchySubsystem hierarchy

Changing Assemblies, Generated Models, and Their Associativity

The associativity of CAD assembly and generated SimMechanics model is open, modifiable, and extensible. As long as a generated SimMechanics model retains at least one associated imported component, this model retains some associativity with its originating CAD assembly.

Preserving associativity.  You preserve the original associativity if you do not remove or reconnect associated components in either the CAD assembly or the SimMechanics model.

Changing the properties of an associated component, without removing or reconnecting it, both uses and preserves associativity.

Extending associativity.  You extend the original associativity if you add new, associable components to the CAD assembly, export the assembly, and update-import the generated SimMechanics model. The new components generated in the updated SimMechanics model are associated with the new components of the CAD assembly.

Modifying associativity.  You modify the original associativity if you remove or reconnect one or more associated components in the SimMechanics model.

  • The associativity of the removed or reconnected associated components is destroyed.

  • The associativity of the other associated components, and of the SimMechanics model as a whole, remains intact.

  • You recreate the original associativity of the removed or reconnected components in the SimMechanics model if you reimport the unchanged components from the CAD assembly.

Replacing associativity.  You replace the original associativity if you remove or reconnect one or more associated components in the CAD assembly.

Once you export the CAD assembly and update-import the SimMechanics model, the associativity of the removed or reconnected components is destroyed. In this case, the component is either connected in a new way, with a new associativity, or it is removed altogether.

Working with Associativity in Common Updating Situations

The unique parallel identities created by associativity allow you to revise and expand CAD assemblies, then export the changed CAD assemblies and update existing SimMechanics models based on them. While you can also create entirely new SimMechanics models from the updated XML, associativity saves the effort invested in editing and testing by reusing existing SimMechanics models.

The following translation cases cover the basic possibilities. You can combine some of them into more complex, compound cases. For example, you can change a CAD assembly by both revising existing component properties and adding new components.

Exporting a CAD Assembly and Generating a SimMechanics Model for the First Time

During CAD export, SimMechanics Link assigns a unique XML identifier to each CAD component. For a table summarizing the different CAD components, see How Associativity Is Implemented.

When you import the XML file and generate a SimMechanics model from it, the corresponding model components listed in the table's second column receive these parallel identities.

Updating a Generated SimMechanics Model by Modifying CAD Assembly Properties

If you modify a CAD assembly and export a new Physical Modeling XML file from it, updating the model with the modifications allows you to reuse an existing SimMechanics model that was previously translated from the same assembly.

You modify a CAD assembly when you change the properties of its components without changing their identity. For a table of CAD assembly components you can modify, see How Associativity Is Implemented.

You update a generated SimMechanics model when you import the Physical Modeling XML file for the modified CAD assembly. The updated model reflects the new component properties in the modified assembly.

Associativity identifies the components in the existing generated SimMechanics model so that the importer can update their properties.

Updating a Generated SimMechanics Model by Extending the CAD Assembly

If you add more components to a CAD assembly and export a new Physical Modeling XML file from it, updating the model with the extensions allows you to reuse an existing SimMechanics model previously translated from the same CAD assembly.

You extend a CAD assembly when you add one or more components to it. For a table of CAD assembly components you can add, see How Associativity Is Implemented.

You update a generated SimMechanics model when you import the Physical Modeling XML file for the extended CAD assembly. The updated model contains new blocks representing the new components in the extended assembly. Blocks representing original CAD components remain unchanged.

Associativity identifies the original components in the existing generated SimMechanics model so that the importer does not change them while adding the new associated components.

Modifying a Generated SimMechanics Model Associated with a CAD Assembly, Then Updating Its Associated Components

You can also manually add nonassociated components to an existing SimMechanics model previously generated from a CAD assembly, separately revise the assembly, then retranslate the assembly by update-importing the SimMechanics model with the revisions.

  • The associated SimMechanics model components are updated with the CAD assembly revisions.

  • The nonassociated SimMechanics model components are not unchanged.

  • If the nonassociated SimMechanics model components are connected in the original model to associated blocks, they might become disconnected after update-import.

    • Nonassociated model components can include Constraints, Drivers, Actuators, and Sensors that you manually added and connected to associated, imported Bodies and Joints.

    • Nonassociated model components can also include Bodies and Joints added manually after you generated the original SimMechanics model. These Bodies and Joints were not import-generated and therefore cannot be associated.

Was this topic helpful?