Book a Demo

Author Topic: how can i get the "extendedProperties" o  (Read 4006 times)

dkkoenig

  • EA Novice
  • *
  • Posts: 16
  • Karma: +0/-0
  • I love YaBB 1G - SP1!
    • View Profile
how can i get the "extendedProperties" o
« on: September 22, 2007, 04:15:02 pm »
i have a diagram, and in the diagram have a element, type is "UMLDIAGRAM", is a "Diagram Reference" of other diagram.

How can i get the value "diagram" of "extendedProperties" with Automation Interface(c#).

in the XMI is:
<element xmi:idref="..." xmi:type="uml:UMLDiagram" Name="test2" scope="public">
...
<extendedProperties tagged="0" package_name="test1" diagram="..."/>
</element>

thanks

«Midnight»

  • EA Guru
  • *****
  • Posts: 5651
  • Karma: +0/-0
  • That nice Mister Grey
    • View Profile
Re: how can i get the "extendedProperties&quo
« Reply #1 on: September 23, 2007, 09:51:51 am »
There are two places worth looking:

The Element class has a Properties collection. See EA Help (I suggest using the help from build 816 or later) for the structure of each property.

If that does not work, try the MiscData fields (again, check the help file for these properties). These are read-only, and you'll have to parse them.

David
No, you can't have it!

dkkoenig

  • EA Novice
  • *
  • Posts: 16
  • Karma: +0/-0
  • I love YaBB 1G - SP1!
    • View Profile
Re: how can i get the "extendedProperties&quo
« Reply #2 on: September 23, 2007, 04:06:47 pm »
i habe read the Help, but no "help" about it

the Code is: cann't get the value of the "extendedProperties"???

Element E;
E = EA_Repository.GetElementByID(839);
int pcount = E.Properties.Count;
Property bbb;
       for (int i=0; i<pcount;i++)
       {
           bbb = E.Properties.Item(i);
       }

dkkoenig

  • EA Novice
  • *
  • Posts: 16
  • Karma: +0/-0
  • I love YaBB 1G - SP1!
    • View Profile
Re: how can i get the "extendedProperties&quo
« Reply #3 on: September 25, 2007, 03:01:53 pm »
THANKS !!!

i have the answer:
"in the Element.MiscData(0) field, and this is the Diagram ID"




:)

«Midnight»

  • EA Guru
  • *****
  • Posts: 5651
  • Karma: +0/-0
  • That nice Mister Grey
    • View Profile
Re: how can i get the "extendedProperties&quo
« Reply #4 on: September 25, 2007, 03:10:31 pm »
Just remember that the field is read only. If you want to modify it you'll have to go into the underlying database via OLE DB or some such means.

You can get a workable connection string from EA via the Repository.ConnectionString() property. [Small wonder!]

You can also open an EAP file as if it were a repository. Just use the same dialogs you would for any other DBMS, but specify the MS Access driver.

David
No, you can't have it!