Book a Demo

Author Topic: Display structural elements programmatically  (Read 4115 times)

gfranz

  • EA User
  • **
  • Posts: 37
  • Karma: +0/-0
    • View Profile
Display structural elements programmatically
« on: May 07, 2013, 10:58:15 pm »
Hello

You can display inherited structural elements (parts) of a class. This diagram object is not editable. Inherited structural elements have their own row in t_object, but I think EA stores the inheritance flag in column "PDATA3", which is filled with the GUID of the original element.

The question is: Can I create such a (reference) element programmatically? Then I could try create my own Structural Elements dialog with some special features.

Thanks!

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +397/-301
  • I'm no guru at all
    • View Profile
Re: Display structural elements programmatically
« Reply #1 on: May 07, 2013, 11:50:52 pm »
Assuming you are right with PDATA3 (I don't know it by heart) you can set that with
Code: [Select]
Repository.Execute ("UPDATE t_object SET (pdata3) VALUES (<gud>) WHERE ObjectID = <id>");
q.

Dermot

  • EA Administrator
  • EA User
  • *****
  • Posts: 591
  • Karma: +7/-0
    • View Profile
Re: Display structural elements programmatically
« Reply #2 on: May 08, 2013, 03:00:39 pm »

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +397/-301
  • I'm no guru at all
    • View Profile
Re: Display structural elements programmatically
« Reply #3 on: May 08, 2013, 05:06:56 pm »
Quote
For standard [highlight]alterations[/highlight] to PDAtA(x) see "MiscData" on:
http://www.sparxsystems.com/enterprise_architect_user_guide/9.3/automation/element2.html
The link you mention specifies that MiscData is r/o. Is that correct? If so, I wouldn't understand why you talk of alterations.

q.
« Last Edit: May 08, 2013, 05:10:26 pm by qwerty »

Dermot

  • EA Administrator
  • EA User
  • *****
  • Posts: 591
  • Karma: +7/-0
    • View Profile
Re: Display structural elements programmatically
« Reply #4 on: May 10, 2013, 11:18:00 am »
Thanks for the update - that is correct.