2 Capella ID's for one single element?

I am so confused with this, I just discovered that my Logical Components in my LAB had 2 ID’s, Capellas ID’s…

This is never the case for Requirements, let’s see:
Selecting the item from the “Project Explorer”:

Vs selecting it from the diagram:

It’s literally the SAME ID.

However when it comes to Logical Components (or cs:Part’s?), let’s look at this:

Cheking the ID for this Logical Component/actor leads us to find 2 DIFFERENTS ID’s!

  1. The second set of properties shown in the image contains the id you get from the element in the project explorer.

  2. The first set contains the id of the TARGETED element by the node in the diagram:

And here we have 2 ID’s.

I thought the “self.target” applied to a graphical element, was supposed to point out to the element shown when we click on “Show In Project Explorer”:

But it is not the case. Was my supposition wrong?

This is very confusing when using Python 4 Capella, since P4C deals mostly with items in the project explorer it seems.
I don’t know if this post fits better here or in the scripting sub forum, If there is no answer I could move it there. Thanks

2 other questions:

  1. Is there any way to show both ID’s in the interpreter (aql) from the element in the project explorer?
    (I would like to show (b15762d2-8f00-434e-9e48-6660e6bf4812) and (2f845c32-f4bd-4f9b-b1b0-00b95c081ca4) even if the “self” in aql is pointing at the item from project explorer)
    → Edit: Found the solution:

Allowed me to get the second id.

  1. Is there a way to obtain the element of my project explorer with aql, starting from the corresponding element shown in the diagram? Example:
    This image shows the ID of the element in the diagram, how can I go from here (self.target) to find the corresponding element in project explorer? Thanks in advance
    Edit: Found the solution:

I wonder if there is a simpler way to do this.

You deals with 2 IDs as there are 2 elements in Capella.
At the beginning, Capella was based on UML approach:
You had something like ‘instance/field’ and ‘Type’. Then, the tool evolved to drop this 2-elements declaration.
But there are some leftovers in the metamodel.
You can make appear both elements in ‘Project Explorer’ view by un-selecting ‘Part’ in ’ v \ Filters and customization …'.
Diagrams may use one or the other semantic mapping.
Take note that you can break your model by editing the part directly.
However, one making customization in Capella must be aware of this legacy.

1 Like

Fascinating, you seem to have been there when it was made…
Is it possible to access to the property “actor” of this previous “LC 1” element, when selecting the diagram element (the one with the second ID it seems), without doing what I did? Meaning without writing this:

It would have been nice to do a simple:

Is there a simpler way to do it, than searching for its counter element in explorer like I did?
I am asking because writing: ((*#)) can be a nightmare in Python4Capella.

You mean aql:self.target.abstractType.actor ?

1 Like

I would not have guessed the answer to this problem. So I checked “AbstractType” in the metamodel:

Found No abstractType.
Nor in the word doc ( python4capella/Python4Capella Simplified Metamodel.docx at master · labs4capella/python4capella · GitHub)

Finally I supposed it could related to EMF/SIRIUS/other Eclipse things maybe, searched a bit:

Sometimes Capella can be complicated for the noninitiate, thanks for the answer.

Edit: Found the solution.