Sparx Systems Forum
Enterprise Architect => Automation Interface, Add-Ins and Tools => Topic started by: KenM on October 01, 2020, 02:55:20 am
-
I've been able to create a script that will programmatically add a linked note to an element. Great!
However, I want to also have the note present the Element Note content - in effect, automating the "Link this note to an Element Feature" connector action.
Can someone give me an idea of how to do this? My search in the forum has only yielded results around modifying the database directly, which is certainly a no-no these days.
-
Just looked into my Inside book and found that t_object.PDATA1 has the linked element feature name. You can start looking into that field and see how it reacts on manipulating the feature link via the context.
q.
-
Sorry, I'm unfamiliar with PDATA1 - can you give me a bit more detail? Are you referring the underlying database?
If so, note that I don't have access to the underlying database; no SQL Server tools to query the database. I've looked at the PropertyType (which I think may be the same as PDATA1, based on some other statements on the forum?), but it's undefined.
Where do I find this book that you speak of?
-
My book can be found below in the link.
Yes, I'm talking about the underlying DB. And more sooner than later you will have the need to directly fiddle with it. PDATA1 is column in t_object which holds info about elements. PDATA1 is only readable via the API. To write it you need to use the (undocumented!) operation Repository.Execute, which takes any UPDATE/INSERT SQL. In order to read the DB use the (documented) Repository.SQLQuery which takes any SELECT SQL and returns an XML result.
q.
-
Thanks. I think you missed supplying the link to your book :)
-
My signature below should lead you there. Else: see here (http://88.198.146.60/brain/books.html) (the first one).
q.
-
@q, your signature is missing....
Geert
-
Oh wow. Thanks Geert. Makes me wonder, why. Have to figure out somehow...
q.
-
Hey fellas,
I saw this at work yesterday, and again from home today. I can see the signature now, and I could yesterday as well.
So possibly the link in Q's signature is blocked for some forum readers.
This could in turn be because it's an unsecure (plain HTTP) link, blocked either by a firewall or the browser itself (possibly a plug-in).
This is the link. See if you can open it:
http://liquit.biz/brain/books.html
Maybe it's time the ol' brain got itself a certificate? :)
/Uffe
-
You are right Uffe,
I get a warning page from MalwareBytes (chrome plugin) when I try to visit that link
https://imgur.com/NGzAYNy (https://imgur.com/NGzAYNy)
I guess that's why I don't see the signature anymore.
Geert
-
Well no, that there is MalwareBytes saying everything under .biz is a scam. That seems a bit harsh.
But either way, no one should be using HTTP anymore. And that goes for you too, my friend. ;D
/U
-
Well no, that there is MalwareBytes saying everything under .biz is a scam. That seems a bit harsh.
But either way, no one should be using HTTP anymore. And that goes for you too, my friend. ;D
/U
Yeah, I guess I should update that image :-[. The site itself uses https since long.
Geert
-
Well no, that there is MalwareBytes saying everything under .biz is a scam. That seems a bit harsh.
But either way, no one should be using HTTP anymore. And that goes for you too, my friend. ;D
/U
Partially I agree, but what I publish there is at a postcard level. No security required. What hurts more is the overhead to get a certificate for your server if you're hosting it on your own. I guess I have to live with people not seeing my signature behind firewalls since probably having a pain-free https-setup will be nothing I can expect to see in the rest of my life.
q.