Book a Demo

Author Topic: Using instances in compartments  (Read 4613 times)

Mats Gejnevall

  • EA User
  • **
  • Posts: 98
  • Karma: +1/-0
    • View Profile
Using instances in compartments
« on: April 05, 2017, 12:05:53 am »
I create instances with the same stereotype as the original element. And I use compartments to show relations between elements. When I create a relation between an element and an instance (where I have defined that the sterotypes have a relation) and display this relation in a compartment (using a RelatedElement shape script)  the object number of the instance is displayed instead of the name of the instance!

Is this a bug or a feature?

Thanks
Mats

Paolo F Cantoni

  • EA Guru
  • *****
  • Posts: 8626
  • Karma: +259/-129
  • Inconsistently correct systems DON'T EXIST!
    • View Profile
Re: Using instances in compartments
« Reply #1 on: April 05, 2017, 09:54:21 am »
I create instances with the same stereotype as the original element. And I use compartments to show relations between elements. When I create a relation between an element and an instance (where I have defined that the sterotypes have a relation) and display this relation in a compartment (using a RelatedElement shape script)  the object number of the instance is displayed instead of the name of the instance!

Is this a bug or a feature?

Thanks
Mats
Hi Mats,

It MIGHT be a feature...   ;)  When you create instances, IFRC the name is empty.  Is yours? If so, put a value in there and see if that changes the output.  I DO know that in shapescripts outputting the #name# macro is affected by the "[ ] Use Alias" setting of the diagram.  So it doesn't surprise me to find that EA returns an "adjusted" name.   'Course, I may be completely wrong!    ;D  This is EAUI, you know.

Paolo
Inconsistently correct systems DON'T EXIST!
... Therefore, aim for consistency; in the expectation of achieving correctness....
-Semantica-
Helsinki Principle Rules!

Mats Gejnevall

  • EA User
  • **
  • Posts: 98
  • Karma: +1/-0
    • View Profile
Re: Using instances in compartments
« Reply #2 on: April 05, 2017, 05:16:30 pm »
Interesting, I had a name on ONE of the linked instances and it showed just the object id of that instance, nothing at all for the second one.
When a added a name to the second one, both instances showed up with names in the compartment!!!

That is a strange feature ::)

Mats