Book a Demo

Author Topic: Export/Import to upgrade SysML elements.  (Read 9784 times)

ChB

  • EA User
  • **
  • Posts: 40
  • Karma: +4/-0
    • View Profile
Export/Import to upgrade SysML elements.
« on: March 16, 2016, 08:54:28 pm »
I'm using EA 12.1 SysEng Edition and SysML 1.4 however I started my model without the SysEng Edition (so without the built-in SysML) and using the old MDG SysML add-on.

I'm now not-using the old SysML addon and have selected Extensions, MDG Technologies..., SysML1.4 (and deselected all other SysML versions).

I therefore want to "update" or "upgrade" the elements in my model to SysML 1.4 stereotypes.  I understand the technique to do that is with an Export-to-csv, edit the csv, import-from-csv workflow.  This isn't working for me.  Here's what I'm doing:

Right click on a package (or view) in the Project Browser and select Import/Export, CSV Import/Export...
Create a Specification (I call it "All") and press the Edit/New button to detail it:
   Delimiter = ,
   Select Element Fields: Name, Type, GUID, Stereotype and Full Qualified Stereotype.
Run the export (including Subfolders and Column Names).
Edit the generated .csv file (e.g. Excel):
   In column "Type" for the ValueTypes: change from "Class" to "DataType".
   In column "Stereotype" for the ValueTypes: change "valueType" to "ValueType".
   In column "Fully Qualified Stereotype":
         change: "SysML Block Definition::block" to "SysML1.4::block"
         change: "SysML Block Definition::valueType" to "SysML1.4::ValueType"
Save the new csv file and import.
EA reports that is updating all the elements but the elements are not actually updated in EA to SysML 1.4 elements. 

The import has been performed in that if I change the name of the element in the CSV file, that change is seen in the model after the import.  The element types are not changed though.

Am I missing a step or doing something wrong?
« Last Edit: March 16, 2016, 11:44:08 pm by ChB »

ChB

  • EA User
  • **
  • Posts: 40
  • Karma: +4/-0
    • View Profile
Re: Export/Import to upgrade SysML elements.
« Reply #1 on: March 16, 2016, 09:40:29 pm »
I should add that the Sparx website includes a section on migrating SysML versions:
http://www.sparxsystems.com/enterprise_architect_user_guide/10/systems_engineering/migrate_sysml_1_1_model_to_sys.html

But:
  • That appears to be for migrating from SysML 1.1 upwards.  I need to do a pre-SysML 1.1 migration (i.e. the old SysML add-on)
  • I'm not sure how to use the script!

ChB

  • EA User
  • **
  • Posts: 40
  • Karma: +4/-0
    • View Profile
Re: Export/Import to upgrade SysML elements.
« Reply #2 on: March 16, 2016, 11:46:01 pm »
Update:
I've edited my original post to include greater detail of the changes I'm making in the CSV file.

ChB

  • EA User
  • **
  • Posts: 40
  • Karma: +4/-0
    • View Profile
Re: Export/Import to upgrade SysML elements.
« Reply #3 on: March 21, 2016, 09:43:27 pm »
Here is the response I've had from Sparx Support about upgrading model elements from SysML 1.0 to SysML 1.4:
Quote
[...]there is no migration script from SysML 1.0, so you will need to be a bit clever, although CSV import will be able to do some of it.

For converting diagrams, you can export to XMI, open in a text editor, search for "MDGDgm=", replace "SysML1.0" with "SysML1.4" then re-import.

For stereotypes that have tagged values, you will probably find that SysML 1.4 has some new tagged values that aren't added in the CSV import. For these, you can right-click the stereotype in the Diagram Toolbox and choose "Synchronize" and that will update the tagged values for all elements in the model with that stereotype.

For other features, such as the new way of representing Units and Quantity Kinds, you will probably need to make the changes manually.

I'm still working on my upgrade.  I hope to post a summary when I've had final success (or failure).

ChB

  • EA User
  • **
  • Posts: 40
  • Karma: +4/-0
    • View Profile
Re: Export/Import to upgrade SysML elements.
« Reply #4 on: April 20, 2016, 11:42:58 pm »
UPDATE:
I did manage to upgrade from SysML 1.1 to 1.4.
The bulk of the work was done with careful use of these 4 steps:
(1 of 4) export to csv
(2 of 4) edit the csv
(3 of 4) import the csv
(4 of 4) Synchronise Stereotype
(5 of 4 ;) ) Some manual fiddling was required too.
(6 of 4 ;) ) Rinse and repeat.

I found it useful and reassuring to manually setup an element as I want the others to be like, then when editing the csv file I could look at that one (in the csv file) to see how the others need to be changed.