Book a Demo

Author Topic: Type Library?  (Read 5535 times)

spelger

  • EA Novice
  • *
  • Posts: 9
  • Karma: +0/-0
    • View Profile
Type Library?
« on: August 01, 2015, 12:46:25 am »
In my work group we create a lot of different projects that utilize the same c++ libraries. I'd like to be able to create something similar in EA, that is, a library that I can import into many EA projects that would contain defined types like certain classes that are used over and over as well as our own well known data types. Is this possible? I started to look at profiles but that seemed the wrong path to me as from what I can tell they appear to contain only abstract extensions to UML.

thanks,
scott

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +397/-301
  • I'm no guru at all
    • View Profile
Re: Type Library?
« Reply #1 on: August 01, 2015, 09:35:44 am »
- Create a package with your lib stuff
- Export as XMI
- Import this package to where you need it
- Either use VC or EA security to lock this package against changes

q.

Eve

  • EA Administrator
  • EA Guru
  • *****
  • Posts: 8110
  • Karma: +119/-20
    • View Profile
Re: Type Library?
« Reply #2 on: August 03, 2015, 08:51:36 am »
Depending on your setup there are two options once you have the XMI to help future users.

First, if you have or are willing to run a cloud server you can set them up as reusable assets.

Alternatively, you can create an MDG technology that provides them as model patterns.

spelger

  • EA Novice
  • *
  • Posts: 9
  • Karma: +0/-0
    • View Profile
Re: Type Library?
« Reply #3 on: August 11, 2015, 03:30:25 am »
Thanks,

The XMI approach appears to be satisfactory for the moment.

scott

Uffe

  • EA Practitioner
  • ***
  • Posts: 1859
  • Karma: +133/-14
  • Flutes: 1; Clarinets: 1; Saxes: 5 and counting
    • View Profile
Re: Type Library?
« Reply #4 on: August 11, 2015, 06:42:16 pm »
If you're planning to use XMI exports from a central repository and then import them in the projects where they're needed, I would suggest having a look at baselines as well.

With baselines you follow essentially the same workflow, but EA handles re-import much better with baselines than it does when you use plain XMI.

With XMI, EA first deletes the current package, then imports it from the file. This means any existing uses (connectors to/from the elements, as well as use of the elements in diagrams which are not themselves included in the XMI) are lost.

With baselines, EA first retrieves all current uses of the elements and caches them, then deletes and reimports, then restores the old uses. (Excepting situations where elements have been deleted in the new version, those uses are of course not restored.)

So if you plan to release more than one single version of this model ever, and you don't want to set up a reusable asset service, baselines are your best bet. An added benefit is that baselines let you review the changes before you deploy the new version, so you can see what will happen to your target model before you hit the button.

Cheers,


/Uffe
My theories are always correct, just apply them to the right reality.

Uffe

  • EA Practitioner
  • ***
  • Posts: 1859
  • Karma: +133/-14
  • Flutes: 1; Clarinets: 1; Saxes: 5 and counting
    • View Profile
Re: Type Library?
« Reply #5 on: August 11, 2015, 07:03:16 pm »
I should also mention that if all you want to do is extend the set of datatypes available in the drop-down list on an attribute, there's a different approach you can use.

Go to Settings -- Code Engineering Datatypes, select C++ and add whatever types you need. These settings can be exported using Project -- Model Import/Export -- Export Reference Data.

If you're generating code from the model, you may or may not need to modify the generation templates for the new types.

And you're right, profiles are not used for this purpose; they're there to extend UML. MDG Technologies are EA's deployment format which combine profiles and several other types of adaptations into one single file.

/U
My theories are always correct, just apply them to the right reality.

Eve

  • EA Administrator
  • EA Guru
  • *****
  • Posts: 8110
  • Karma: +119/-20
    • View Profile
Re: Type Library?
« Reply #6 on: August 12, 2015, 09:26:29 am »
Quote
With XMI, EA first deletes the current package, then imports it from the file. This means any existing uses (connectors to/from the elements, as well as use of the elements in diagrams which are not themselves included in the XMI) are lost.

With baselines, EA first retrieves all current uses of the elements and caches them, then deletes and reimports, then restores the old uses. (Excepting situations where elements have been deleted in the new version, those uses are of course not restored.)
Not sure where you get this from.

The procedure described for baselines is pretty much what EA has always1 done when updating an existing package from XMI.

There is a little more functionality available when using the XMI 1.1 export, as that allows comparing the model to the XMI. Also baselines and controlled packages (including Version Control) offer of excluding the contents of child package.

1Always in this context means since before both I started working here and baselines existed.