Documentation

Retranslate CAD Assembly

Associativity and Updating

To update an existing generated Simscape™ Multibody™ 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 Simscape Multibody models based on them, and the export and updating process that defines Simscape Multibody models from CAD assemblies.

Associativity Between CAD Assemblies and Simscape Multibody Models

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

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

You actualize associativity when you generate a Simscape Multibody 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 Simscape Multibody 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 Simscape Multibody worlds, because the translation process moves in one direction only, from CAD assembly to generated Simscape Multibody model.

When and Why You Need Associativity

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

How Associativity Is Implemented

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

Parallel Identities Between CAD Assembly and Simscape Multibody Model Components Captured by Associativity

CAD Assembly ComponentsCorresponding Imported Simscape Multibody 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 Simscape Multibody model is open, modifiable, and extensible. As long as a generated Simscape Multibody 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 Simscape Multibody 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 Simscape Multibody model. The new components generated in the updated Simscape Multibody 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 Simscape Multibody model.

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

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

  • You recreate the original associativity of the removed or reconnected components in the Simscape Multibody 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 Simscape Multibody 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 Simscape Multibody models based on them. While you can also create entirely new Simscape Multibody models from the updated XML, associativity saves the effort invested in editing and testing by reusing existing Simscape Multibody 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 Simscape Multibody Model for the First Time

During CAD export, Simscape Multibody 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 Simscape Multibody model from it, the corresponding model components listed in the table's second column receive these parallel identities.

Updating a Generated Simscape Multibody 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 Simscape Multibody 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 Simscape Multibody 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 Simscape Multibody model so that the importer can update their properties.

Updating a Generated Simscape Multibody 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 Simscape Multibody 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 Simscape Multibody 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 Simscape Multibody model so that the importer does not change them while adding the new associated components.

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

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

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

  • The nonassociated Simscape Multibody model components are not unchanged.

  • If the nonassociated Simscape Multibody 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 Simscape Multibody model. These Bodies and Joints were not import-generated and therefore cannot be associated.

Was this topic helpful?