Documentation Center

  • Trial Software
  • Product Updates

Model Update with Physical Modeling XML

About Model Update and Mechanical Import

The mech_import command and import dialog let you update models previously generated from Physical Modeling XML. After revising the model's originating CAD assembly, you export a new XML file representing the changed system. You can import this new XML file to generate a new SimMechanics model, although you would have to repeat on the new model whatever manual, post-translation work you did on the old model.

Translating a Revised CAD Assembly by Generating a New SimMechanics Model

But you can also update-import: import the new XML file to update the existing model. Update-importing allows you to retain whatever manual, post-translation work you did on the old model. You also keep any unchanged CAD-related features of the model.

Translating a Revised CAD Assembly by Updating an Existing Generated SimMechanics Model

Updating by Subsystem, Machine, and Model

Update-import encompasses three distinct ways of revising a generated model with revised assembly information. It revises by blocks within a machine, an entire machine, an entire subsystem, or the entire model.

  • Updating an existing machine in the model, which might include adding new blocks to the machine

  • Adding a new machine to the model

  • Replacing model or subsystem contents with entirely new contents

    Note:   Update-import respects the model-machine-subsystem hierarchy of an existing model. If you want to change this existing model hierarchy, you must manually edit the generated model or generate a new model from your CAD assembly or XML file.

Requirements for Updating a Previously Generated Model by Importing Physical Modeling XML

This section assumes that you have the SimMechanics product installed locally or remotely, and that you have:

  • The XML file representing a revised CAD assembly

  • The generated SimMechanics model you want to update

  • Optionally, the STL body geometry files associated with the CAD assembly

To update-import the model, you do not need the CAD platform or assembly from which the XML file was exported. You also do not need the SimMechanics Link utility.

Inheritance Relationships Between Assemblies and Models.  See Controlling Model Update at the Block Level following for a complete explanation of the inherited structure and identity shared by assemblies and models based on them.

Controlling the Automatic Backup of Updated Models

Updating an existing generated model erases previous model information. But, by default, the importer saves a copy of the previous version of the model through automatic backup. You can control this automatic backup through the options in the mech_import command or the import dialog. You can choose any one of these possibilities

  • Back up your previous model version in the same folder as the new version. This is the default.

  • Back up your previous model version in a different folder, which you specify.

  • Do not back up your previous model version at all.

You can set these options through the Backup mode pull-down menu in the Backup area of the Advanced Options tab of the import dialog.

Revisions to STL Body Geometry Files

Any revisions to an existing CAD assembly are reflected in the new set of exported STL files that replace the old set of STL files from the earlier version of that assembly. Each updated Body block continues to reference its corresponding STL file.

Updating a Machine in a Generated Model with Revisions

Revising a SimMechanics model previously generated from a CAD assembly means that the importer translates changes to assembly part and constraint properties into changes in Body and Joint properties. Depending on the nature of the assembly changes, new blocks and connections can be added as well, and individual blocks can be replaced. Property changes include changes to body mass properties and to body and grounded coordinate system (CS) properties. Revising changes or extends only a single machine in the model with revisions.

You start such an update-import with either

  • The mech_import command; see the command reference page.

  • The import dialog. On the Import tab, under Import mode, select Update existing model. After configuring and applying the settings, click OK.

    Using the two fields at the bottom of this tab, you can enter a nondefault model name, and possibly a subsystem name, into which to import the revisions. The default is for the importer to take the model and subsystem names from the XML file. In either case, the specified model, and possibly subsystem, must exist for the update-import to succeed.

Controlling the Appearance and Hierarchy of an Updated Machine

An update-import can change the appearance of a generated machine. In both the mech_import command and on the Advanced Options tab of the import dialog, you can control how these changes occur. These controls are similar to the controls available for importing a new model. See Controlling New Model Import in the preceding section, Generating New Models from Physical Modeling XML.

  • In the Layout area, you can require that the importer label new Joint blocks with short names based on the Joint type.

  • In the Update area, you can require the importer to:

    • Find the best spatial arrangement of the blocks.

    • Import new Joint blocks at the highest level, depending on whether you are importing into a model or a subsystem, and regardless of where the corresponding degrees of freedom occur in the original assembly.

Controlling How Update-Import Changes Individual Blocks

In the Update area, you can use Respect individual block update settings to control on a block-by-block basis how the importer changes blocks and their connections with updates. Proper control of individual block updating requires understanding how a generated model "remembers" its originating assembly. See the following section, Controlling Model Update at the Block Level.

Adding a New Machine to a Generated Model

Adding a new machine to a SimMechanics model previously generated from a CAD assembly means that the importer translates a completely new assembly into additional Bodies, Joints, and subsystems. Such changes do not include updating existing machines in the model.

You start such an update-import with either:

  • The mech_import command; see the command reference page.

  • The import dialog. On the Import tab, under Import mode, select Add to existing model. After configuring and applying the settings, click OK.

    Using the two fields at the bottom of this tab, you can enter a nondefault model name, and possibly a subsystem name, into which to import the revisions. The default is for the importer to take the model and subsystem names from the XML file. In either case, the specified model, and possibly subsystem, must exist for the update-import to succeed.

    If you are adding a new subsystem, select the Create new subsystem if it does not exist check box.

Controlling the Appearance and Hierarchy of an Updated Model with an Added Machine

An update-import with an additional machine changes the appearance and hierarchy of a model. In both the mech_import command and the Layout and Model Simplification areas of the Advanced Options tab of the import dialog, you can control how these additions occur, in the same way as if you were generating a new model. See Controlling New Model Import in the preceding section, Generating New Models from Physical Modeling XML.

Replacing Generated Model or Subsystem Contents with a New Machine

Replacing model and subsystem contents in a SimMechanics model previously generated from a CAD assembly means that the importer either:

  • Completely erases the contents of the model at the top level and replaces these contents with an entirely new machine.

  • Completely erases the contents of a subsystem and replaces these contents with an entirely new subsystem.

You start such an update-import with either:

  • The mech_import command; see the command reference page.

  • The import dialog. On the Import tab, under Import mode, select Import into existing model (replace model or subsystem contents). After configuring and applying the settings, click OK.

    Using the two fields at the bottom of this tab, you can enter a nondefault model name, and possibly a subsystem name, into which to import the revisions. The default is for the importer to take the model and subsystem names from the XML file. In either case, the specified model, and possibly subsystem, must exist for the update-import to succeed.

Controlling the Appearance and Hierarchy of an Updated Model or Subsystem with Replaced Contents

An update-import with completely replaced contents changes the appearance and hierarchy of a generated model or subsystem. In both the mech_import command and the Layout and Model Simplification areas of the Advanced Options tab of the import dialog, you can control how these additions occur, in the same way as if you were generating a new model. See Controlling New Model Import in the preceding section, Generating New Models from Physical Modeling XML.

Was this topic helpful?