Sparx Systems Forum

Enterprise Architect => General Board => Topic started by: wivel on April 08, 2024, 04:19:49 am

Title: EA_Guid of 'current element' in an SQL search
Post by: wivel on April 08, 2024, 04:19:49 am
Hi

Is there anyway, that I in a Custom SQL of a ModelView, have access to the EA Guid of the ModelView Element itself? Or is there a clever way of obtaining it tha I have missed? I would like the make a generic table, that can be 'plugged-in' on several diagrams, without having to physically change the EA GUID in the search for each copy I make.

Henrik
Title: Re: EA_Guid of 'current element' in an SQL search
Post by: qwerty on April 08, 2024, 08:52:48 am
It's the one tha has no parent...

q.
Title: Re: EA_Guid of 'current element' in an SQL search
Post by: wivel on April 08, 2024, 09:33:57 pm
It's the one tha has no parent...

q.
Hmmmm. Would the ModelView element not have a parent when it is added to a diagram? According to the t_object table it does have a parent.

Henrik 
Title: Re: EA_Guid of 'current element' in an SQL search
Post by: Geert Bellekens on April 08, 2024, 09:59:53 pm
I haven't found a better solution yet.

I did write a script a while ago for a client to create a modelview on a diagram.
In this script I set the correct GUID for the query.

Geert
Title: Re: EA_Guid of 'current element' in an SQL search
Post by: wivel on April 08, 2024, 11:12:45 pm
I haven't found a better solution yet.

I did write a script a while ago for a client to create a modelview on a diagram.
In this script I set the correct GUID for the query.

Geert
Doing the same thing, but its error prone, especially when handing over maintenance to others. Even if it is well documented, if I have to say so myself ;).

What I would like to see is something like #SelfID# and #SelfGUID# macros.

Henrik