Please note : This help page is not for the latest version of Enterprise Architect. The latest help can be found here.

Migrate SysML Model to Later SysML Version

Enterprise Architect provides a useful feature to migrate a model from one version of SysML to the next. A model (or part of a model) created in an older version of the SysML MDG Technology can be migrated to the next version using the automation interface. This function updates the Tagged Values and, if required, stereotypes to the later version for all elements, attributes, connectors and diagrams under the selected Package or element.

Example Script for Migrating SysML 1.1 to SysML 1.2

This VB script calls the Migrate() function to migrate the SysML 1.1 Package or element to SysML 1.2:

Sub MigrateElement (sGUID, lngPackageID)

Dim proj as EA.Project

set proj = Repository.GetProjectInterface

proj.Migrate sGUID, "SysML1.1", "SysML1.2"

'refresh the model

If lngPackageID<>0 Then

Repository.RefreshModelView (lngPackageID)

End If

End Sub

Sub MigrateSelectedItem

Dim selType

Dim selElement as EA.Element

Dim selPackage as EA.Package

selType = GetTreeSelectedItemType

If selType = 4 Then 'means Element

set selElement = GetTreeSelectedObject

MigrateElement selElement.ElementGUID, selElement.PackageID

MsgBox "Element Migration Completed",0,"SysML Migration"

ElseIf selType = 5 Then 'means Package

set selPackage = GetTreeSelectedObject

MigrateElement selPackage.PackageGUID, selPackage.PackageID

MsgBox "Package Migration Completed",0,"SysML Migration"

Else

MsgBox "Select a Package or Element in the Project Browser to initiate migration",0,"SysML Migration"

End If

End Sub

Sub Main

MigrateSelectedItem

End Sub

Main

Migrate SysML 1.1 to SysML 1.3

Migrate from SysML 1.1 to SysML 1.2, as explained earlier, then migrate from SysML 1.2 to SysML 1.3, as described in the next section.

Migrate SysML 1.2 to SysML 1.3

The MDG Technology for SysML 1.3 has a built-in script for migrating 1.2 models to 1.3. You must enable both the MDG Technology for SysML 1.2 and the MDG Technology for SysML 1.3. Firstly, you select the SysML 1.2 Package in the Project Browser, then you open the Scripting window and open the SysML 1.3 script group, and finally you execute the Migrate script.

Notes

  • When migrating from SysML1.1 to SysML1.2:
  • The stereotype dimension is changed to quantitykind
  • The stereotype dataType is removed from SysML1.2
  • The Tagged Value dimension is migrated to quantitykind; this applies to stereotypes unit and valueType
  • The Tagged Value isConjugated of stereotype flowport is migrated to custom properties

Learn more