Main Content


Revert interface dictionary migration changes applied from analysis of a model or an architecture

Since R2022b



revert(migratorObj) reverts changes that resolve conflicts in data types and interfaces that were migrated to an interface dictionary. The migration analysis from the analyze function identifies these conflicts.


collapse all

After creating a Simulink.interface.dictionary.Migrator object, you can analyze data type and interface content in the model for migration to the interface dictionary and apply the migration.

Select a model that is linked to a data dictionary or an architecture that is linked to an interface dictionary. See figure. The goal of the migration is to add content to the interface dictionary and link the models and dictionaries.

Before Linking Sources and Data Migration

Image of unlinked models, data dictionary, and interface dictionary

In this example migration, there are no conflicting data types or interfaces. The analysis identifies:

  • The data types to migrate are MyAlias, AliasOfMyAlias, NonInterfaceBus, and LinkedAlias.

  • The interfaces to migrate are MyBus and AnotherMyBus.

The architecture consists of SWC1, SWC2, and Composition. The architecture uses a data dictionary hierarchy of dDictionary.sldd --> dLinkedDictionary.sldd.

Load the model and load the base workspace data.


Create a Simulink.interface.dictionary.Migrator object.

myMigratorObj = Simulink.interface.dictionary.Migrator( ...
    "mArchitectureWithDataDictionary", ...

Perform migration analysis and display analysis results.


disp('Imported interfaces')
cellfun(@(x) x.Name,myMigratorObj.InterfacesToMigrate, ...
disp('Imported datatypes')
cellfun(@(x) x.Name,myMigratorObj.DataTypesToMigrate, ...
disp('Objects in conflict')
cellfun(@(x) strcat(x{1}.Name,' -> ',x{1}.Source), ...
disp('Unused objects')
cellfun(@(x) x.Name,myMigratorObj.UnusedObjects, ...

Apply migration analysis results.


After migration (the apply step), the models and dictionaries are linked. See figure.

After sources have been linked and data has been migrated

Image of linked models, data dictionary, and interface dictionary

To revert the migration to the interface dictionary and undo changes to sources, use the revert function. To keep the migration and changes, use the save function.


After reverting migration, unlinking sources, and undoing data migration

Image of unlinked models, data dictionary, and interface dictionary

Input Arguments

collapse all

Migrator object, specified by a Simulink.interface.dictionary.Migratorfunction.

Version History

Introduced in R2022b