Sparx Systems Forum
Enterprise Architect => Automation Interface, Add-Ins and Tools => Topic started by: Viking on December 09, 2017, 05:15:24 am
-
Hello together,
I thought that finding out the GUID of a diagram without using a script is simple. But it is not. The property field is empty. The question has already been asked, but no answer was given: http://sparxsystems.com/forums/smf/index.php?topic=12845.0 (http://sparxsystems.com/forums/smf/index.php?topic=12845.0).
Could someody give me the answer, please? Many thanks in advance, V.
-
Context menu: Copy GUID
q.
-
Sorry Viking,
you may expore your eap-file as database and find an ea_guid column inside table t_diagram - but that's only to fool you.
Diagrams don't have their own ea_guid.
If any is shown than the one from the package they are in. Because searching for the ea_guid of t_diagrams always leads me to the packages.
Cheers,
Shegit.
-
Sorry Viking,
you may expore your eap-file as database and find an ea_guid column inside table t_diagram - but that's only to fool you.
Diagrams don't have their own ea_guid.
If any is shown than the one from the package they are in. Because searching for the ea_guid of t_diagrams always leads me to the packages.
Cheers,
Shegit.
That is just wrong. Diagrams have guid's just like almost anything else in the EA world.
Geert
-
Well, I'm here to learn: please upload an eap-file with a few diagrams (at least one package with two diagrams) and list the ea-guids.
I use as guid-search this query:
select * from t_object where ea_guid like '*<Search Term>*'
If I understand you right, then I will find none of your guids with this query.
If I find all and they direct me to the package instead (using control + g as shortcut in resultlist) - what else do I do wrong? I expect to find this guids only querying t_diagram.
Because whenever I switch from an element or package to a diagram and have properties window open all time, the shown guid either disappears or does not change.
Thanks,
Shegit
modified: more detailed description of my pov.
-
Shegit,
As mentioned before the properties window does not get filled in when you select a diagram in the project browser.
You can however right click on this diagram and select Copy/Paste | Copy Node GUID to clipboard to get the GUID of the diagram.
Geert
PS. I feel uncomfortable with the passive-aggressive tone in your post. :(
-
Hi Geert,
thanks for your repeat how to get it and I see that my way to get a diagram's guid is broken.
I'm sorry that I made you uncomfortable and I apologize for my tone. Thank you for raising this issue.
(it is based in my personal frustation with wrong usage and "gui bug" - so never ever a reason to get aggressive against you)
Thanks,
Shegit
-
Thank you very much !!! Thanks also to the learners. I am also here to learn :)
-
I use as guid-search this query:
select * from t_object where ea_guid like '*<Search Term>*'
With that you search in the elements, so no wonder you get only packages. (It's a bit like the drunken man searching the lost keys for the house under the street light - not because he lost them there, but because the light is better. LOL)
To find diagram guids you need something like
select * from t_diagram where ea_guid like '*<Search Term>*'
q.
-
Just to extend the idea of a guid search, here's an example of how that might look if you wanted to search across multiple tables.
select ea_guid AS CLASSGUID, Diagram_Type as CLASSTYPE, 't_diagram' as CLASSTABLE, Name, Author, CreatedDate, ModifiedDate, ea_guid as GUID from t_diagram where ea_guid like '*<Search Term>*'
union
select ea_guid AS CLASSGUID, Object_Type as CLASSTYPE, 't_object' as CLASSTABLE, Name, Author, CreatedDate, ModifiedDate, ea_guid as GUID from t_object where ea_guid like '*<Search Term>*'
union
select ea_guid AS CLASSGUID, 'Attribute' as CLASSTYPE, 't_attribute' as CLASSTABLE, Name, null, null, null, ea_guid as GUID from t_attribute where ea_guid like '*<Search Term>*'
union
select ea_guid AS CLASSGUID, 'Operation' as CLASSTYPE, 't_operation' as CLASSTABLE, Name, null, null, null, ea_guid as GUID from t_operation where ea_guid like '*<Search Term>*'
order by 4
-
As a post-note: the "*" should be replaced by "#wc#" so it will work also on non MS Access (aka EAP) RDBMS.
q.
-
As a post-note: the "*" should be replaced by "%wc%" "#WC#" so it will work also on non MS Access (aka EAP) RDBMS.
q.
FTFY
Geert
-
When I see #WC# all I can think of is the plan notation for water closet.
-
Thanks, Geert. I corrected that.
q.