Author Topic: .NET AddIn isComposite missing?  (Read 6356 times)

kaimeder

  • EA Novice
  • *
  • Posts: 11
  • Karma: +0/-0
  • I love YaBB 1G - SP1!
    • View Profile
.NET AddIn isComposite missing?
« on: March 06, 2009, 08:03:17 pm »
Hello,

using the newest .NET AddInn-dll, there is no IsComposite Property to check whether an object is Composite (Activity-composition of other Activities).
Is this unavailable? How can I check for composite-structures?

Thanks,
Kai

Frank Horn

  • EA User
  • **
  • Posts: 535
  • Karma: +1/-0
    • View Profile
Re: .NET AddIn isComposite missing?
« Reply #1 on: March 06, 2009, 08:18:13 pm »
It's the Element.Subtype property which is = 8 for composite elements. In case of activities there are some more values (for loop, conditional a.s.o.), see also

http://www.sparxsystems.com/cgi-bin/yabb/YaBB.cgi?num=1233666876/7#7

kaimeder

  • EA Novice
  • *
  • Posts: 11
  • Karma: +0/-0
  • I love YaBB 1G - SP1!
    • View Profile
Re: .NET AddIn isComposite missing?
« Reply #2 on: March 06, 2009, 08:49:15 pm »
Thanks alot!
Do you also know how to get a Composite's Target/Content/Composed Element?

Thanks,
Kai

Frank Horn

  • EA User
  • **
  • Posts: 535
  • Karma: +1/-0
    • View Profile
Re: .NET AddIn isComposite missing?
« Reply #3 on: March 06, 2009, 09:56:04 pm »
I've never tried it, but EA.Element has collections like Connectors, Elements or EberddedElements which should contain the stuff within it (or below it, from a project browser point of view).

kaimeder

  • EA Novice
  • *
  • Posts: 11
  • Karma: +0/-0
  • I love YaBB 1G - SP1!
    • View Profile
Re: .NET AddIn isComposite missing?
« Reply #4 on: March 06, 2009, 11:06:15 pm »
the problem is though that such a hyperlinked/composite activity has in fact Elements.Count=0 etc... like in the project-browser, these elements have no sub-objects at all.
any hint how to get the hyperlink-target?
Thanks!
Kai

Frank Horn

  • EA User
  • **
  • Posts: 535
  • Karma: +1/-0
    • View Profile
Re: .NET AddIn isComposite missing?
« Reply #5 on: March 06, 2009, 11:23:04 pm »
What is a hyperlinked activity? Or what do you mean by hyperlink-target? How do you create such a thing?

«Midnight»

  • EA Guru
  • *****
  • Posts: 5651
  • Karma: +0/-0
  • That nice Mister Grey
    • View Profile
Re: .NET AddIn isComposite missing?
« Reply #6 on: March 07, 2009, 12:45:18 am »
Quote
It's the Element.Subtype property which is = 8 for composite elements. In case of activities there are some more values (for loop, conditional a.s.o.), see also

http://www.sparxsystems.com/cgi-bin/yabb/YaBB.cgi?num=1233666876/7#7
Part of the problem - Frank alludes to this regarding Activities, but I am referring to the general case - is that the documentation for the SubType attribute is incomplete, and vague where it exists.

Regarding the value for Composite setting (=8) does mention it works for a composite Activity, then goes on to say it also works for for other elements "such as Use Cases." This is not really helpful when you want to figure out exactly what EA will accept, and what will happen in each case.

The documentation goes on to say that "there are many more Types [sic] than indicated in the above examples." Once again, not helpful.

Yes, I've reported this as a documentation bug. Thus far this one has not been dealt with (to the extent necessary). I think part of the problem is that the only 'real' information is in the source code, and predates recent efforts to update the EA docs.

Sigh...
No, you can't have it!

kaimeder

  • EA Novice
  • *
  • Posts: 11
  • Karma: +0/-0
  • I love YaBB 1G - SP1!
    • View Profile
Re: .NET AddIn isComposite missing?
« Reply #7 on: March 08, 2009, 02:50:28 am »
If you take a Diagram, drag-n-drop, hyperlink, you've got an composite activity.
I need to get the activity's target (the original diagram) where it hyperlinks to!

@Midnight: yes, the documentation ist quite *useless* on certain topics.

Thanks,
Kai

kaimeder

  • EA Novice
  • *
  • Posts: 11
  • Karma: +0/-0
  • I love YaBB 1G - SP1!
    • View Profile
Re: .NET AddIn isComposite missing?
« Reply #8 on: March 13, 2009, 10:16:54 pm »
Hey Sparx, anyone,

any idea how to use the Automation-Interface to get Metainformation about Hyperlinked Diagram-Objects?

thanks in advance,
Kai

Frank Horn

  • EA User
  • **
  • Posts: 535
  • Karma: +1/-0
    • View Profile
Re: .NET AddIn isComposite missing?
« Reply #9 on: March 13, 2009, 10:48:58 pm »
Quote
If you take a Diagram, drag-n-drop, hyperlink, you've got an composite activity.

I don't get a composite activity this way, but just a hyperlink on the diagram.

kaimeder

  • EA Novice
  • *
  • Posts: 11
  • Karma: +0/-0
  • I love YaBB 1G - SP1!
    • View Profile
Re: .NET AddIn isComposite missing?
« Reply #10 on: March 13, 2009, 10:56:07 pm »
OK, if you got a hyperlinked diagram-object.
Do you know any way to get the target-diagram where the object is linking to?
Thanks,
Kai

Frank Horn

  • EA User
  • **
  • Posts: 535
  • Karma: +1/-0
    • View Profile
Re: .NET AddIn isComposite missing?
« Reply #11 on: March 13, 2009, 11:35:43 pm »
The hyperlink on the diagram should be represented in the API by an item within the Diagram.DiagramObjects collection. And this item should be of type EA.DiagramObject and have a DiagramID property carrying the ID of the target diagram.

kaimeder

  • EA Novice
  • *
  • Posts: 11
  • Karma: +0/-0
  • I love YaBB 1G - SP1!
    • View Profile
Re: .NET AddIn isComposite missing?
« Reply #12 on: March 13, 2009, 11:46:40 pm »
However the problem is DiagramObjects.Count == 0.
Should this work or is it actually working with the .NET Automation?

Thanks alot Frank!
Kai

Frank Horn

  • EA User
  • **
  • Posts: 535
  • Karma: +1/-0
    • View Profile
Re: .NET AddIn isComposite missing?
« Reply #13 on: March 14, 2009, 12:58:47 am »
If you have a diagram containing a hyperlink, and you're sure that you're accessing this very diagram in your code, and DiagramObjects.Count == 0, then I'd say it's a bug which you should report via the official bug report link.

kaimeder

  • EA Novice
  • *
  • Posts: 11
  • Karma: +0/-0
  • I love YaBB 1G - SP1!
    • View Profile
Re: .NET AddIn isComposite missing?
« Reply #14 on: March 14, 2009, 01:00:22 am »
K, gotta report it...
thanks alot!