Sparx Systems Forum
Enterprise Architect => General Board => Topic started by: David.Molesworth on May 26, 2021, 12:50:34 pm
-
I'd like to create a data entity catalogue out the objects in EA. Thought this would be a simple one table SQL query. By description I mean the rich text box on the object / properties page. t_object is the main table - name field found simple enough. Can't find the description field. Because rich text, maybe more complex. Not even sure what the field is called? No label on the front-end. Tried to use the Query builder, but I can't seem to edit the fields returned beyond the base entity
-
Hi David,
You probably want the Notes column in t_object. But it contains HTML descriptors if you use character enhancements (bolding, italics etc.)
HTH,
Paolo
[Edit: My bad... Thanks, Geert!]
-
t_object.Note is the description field.
If you use the search window and leave the name of the field as "note" then EA will format the text for you.
If you want plain text you better use a little script.
You can get the contents you need using Repository.SQLQuery and you can then convert the description to plain text using Repository.GetFormatFromField
Geert
-
Thanks Paolo and Geert for the replies. How did I miss that field? - seems obvious.
Went back to my query and run a simple:
select name, note from t_object
where object_type = 'Class'
No error, but no note field returned. Same if I run select * from t_object. Are the HTML descriptors preventing the column being returned?
I'm just running from the SQL Scratch pad option in Search Model feature
-
For some reason you need to run
SELECT note as notex, * from t_object
(notex might be anything else)
q.
-
There is an option to show or hide the notes in the search window. It works on the name of the field returned.
Geert
-
Thanks guys for the fast responses. That resolved it. The one field that is hidden by default. I get the rational why the field is treated differently, but Sparx don't make this stuff easy