Book a Demo

Author Topic: convert component into package  (Read 4318 times)

Mr. Sanders

  • EA User
  • **
  • Posts: 187
  • Karma: +0/-0
  • Dilbert for president
    • View Profile
convert component into package
« on: January 07, 2008, 03:01:12 am »
Hello,

is there a possibility to convert a component into a package?


Michael

thomaskilian

  • Guest
Re: convert component into package
« Reply #1 on: January 07, 2008, 04:21:37 am »
Only by using an add-in.

Mr. Sanders

  • EA User
  • **
  • Posts: 187
  • Karma: +0/-0
  • Dilbert for president
    • View Profile
Re: convert component into package
« Reply #2 on: January 07, 2008, 04:23:50 am »
Hello Thomas,

do you mean a add-in wrote by ourself, or are you talking about an existing add-in?

Michael

thomaskilian

  • Guest
Re: convert component into package
« Reply #3 on: January 07, 2008, 04:27:23 am »
Well, I actually do not know of any "public" add-in. So I'm talking f home brew stuff. It's actually quite easy once you know the API. But the kick off is tedious...

«Midnight»

  • EA Guru
  • *****
  • Posts: 5651
  • Karma: +0/-0
  • That nice Mister Grey
    • View Profile
Re: convert component into package
« Reply #4 on: January 07, 2008, 04:42:57 am »
Quote
Well, I actually do not know of any "public" add-in. So I'm talking f home brew stuff. It's actually quite easy once you know the API. But the kick off is tedious...

But generally worth the effort.

It's a two-edged sword though. If you only need one or two simple things, and add-in will often solve them in a jiffy. But you're stuck with a learning curve that makes it hard to justify unless you expect to repeatedly have the problems.

If you have some really big issues, the learning curve can be steep and long. Still, it often pays off the first time, once you've taken the hit.

One very nice thing is that while the API is COM, it is fairly 'approachable' from a variety of languages. There's even a Java variant, though that component is still having a few growing pains.

IMHO - so take your own situation into account - the bottom line is to learn the API.

David
No, you can't have it!

Mr. Sanders

  • EA User
  • **
  • Posts: 187
  • Karma: +0/-0
  • Dilbert for president
    • View Profile
Re: convert component into package
« Reply #5 on: January 07, 2008, 04:56:02 am »
Hello Thomas and David,

thank you, I know the API and I will use the C# interop
assembly.

We have a couple of components which should be changed into a package, so the api will be fine.

I expected that it could be done by changing the stereotype,
but unfortunatly it isn't possible.

It could be so easy if the EA wouldn't hide the elements metatypes (stereotypes) from packages, components etc.

Thank you for your help.

«Midnight»

  • EA Guru
  • *****
  • Posts: 5651
  • Karma: +0/-0
  • That nice Mister Grey
    • View Profile
Re: convert component into package
« Reply #6 on: January 07, 2008, 05:21:08 am »
Quote
...
I expected that it could be done by changing the stereotype,
but unfortunatly it isn't possible.

It could be so easy if the EA wouldn't hide the elements metatypes (stereotypes) from packages, components etc.
...

The Element class has a MetaType property. It is read-only (drat!) and returns a string. The description seems to indicate that this is the metatype assigned by an MDG technology.

Unfortunately, when I needed to do something much like you describe the fact that this property was read-only was a show-stopper, so I did not investigate further. Since then I've gone ahead with developing a technology, which looks like it will solve my original problem (at least in the scope we're discussing here). I've not had occasion to revisit this property since.

You might at least be able to read this property to see what you've got. Given what (little) the documentation says, I cannot say whether the field will be populated for 'standard' EA elements. I don't even know if this field applies to the project where the technology is developed, those where it is used, or both.

If you look into this please post back if you learn anything interesting.

David
No, you can't have it!