Sparx Systems Forum

Enterprise Architect => Automation Interface, Add-Ins and Tools => Topic started by: Paolo F Cantoni on January 27, 2016, 06:42:20 pm

Title: Custom Properties via MDG?
Post by: Paolo F Cantoni on January 27, 2016, 06:42:20 pm
Most of us who play with MDG Technologies, know that the "Advanced Properties" for an element or relationship end up as CustomProperties in t_xref.

Is there any way in the MDG specification process whereby one can define a new CustomProperty?

Thomas' excellent book on MDG is, unfortunately, silent on the matter (and the Help doesn't seem to provide any answer either).

TIA,
Paolo
Title: Re: Custom Properties via MDG?
Post by: qwerty on January 27, 2016, 09:57:37 pm
I'll have a look into that - but no promises ;)

q.

P.S. After some fiddling around I found that it is possible to add new CPs with an INSERT statement. I had to reload EA to show them. Will need a bit more of experimenting.

P.P.S. Brake! After a consistency check the new value has been removed (claimed to be duplicate?!)
Title: Re: Custom Properties via MDG?
Post by: Paolo F Cantoni on January 28, 2016, 11:32:10 am
Thanks q,

Don't "bust a gut" getting to the bottom of it.  After a bit of a think, I decided that Custom Properties were too hard to get at... (Decoding all that text) So I opted to go for Tagged Values instead - much easier to work with "under the covers", but not as conceptually nice as custom properties.

BTW: Are Custom Properties visible in Shapescripts?  If not, then another reason for not using them.

Paolo
Title: Re: Custom Properties via MDG?
Post by: qwerty on January 28, 2016, 09:11:45 pm
To my knowledge only indirectly via an add-in.

q.
Title: Re: Custom Properties via MDG?
Post by: Paolo F Cantoni on January 29, 2016, 11:00:00 am
To my knowledge only indirectly via an add-in.

q.
That's what I thought; but if you search the help for the word "triangle", in Query Methods topic, there's an example with what seems like user defined Custom Properties.  RoyC, can you comment?

Paolo
Title: Re: Custom Properties via MDG?
Post by: qwerty on January 29, 2016, 11:21:14 am
The only one I found was http://sparxsystems.com/enterprise_architect_user_guide/12.1/building_models/writing_scripts.html (http://sparxsystems.com/enterprise_architect_user_guide/12.1/building_models/writing_scripts.html) but I can't spot any custom property reference.

q.
Title: Re: Custom Properties via MDG?
Post by: RoyC on January 29, 2016, 12:09:37 pm
I found the text that Paolo is referring to. I can't really comment on it other than to say that it does what it says it does. Have a play with it and see if it meets your requirements.
Title: Re: Custom Properties via MDG?
Post by: qwerty on January 30, 2016, 06:38:22 am
It would have been nice if you let others participate by posting the link  :P

q.
Title: Re: Custom Properties via MDG?
Post by: RoyC on February 01, 2016, 09:36:04 am
http://sparxsystems.com/enterprise_architect_user_guide/12.1/building_models/query_methods.html

The second section of the topic, HasProperty and user-selected settings.
Title: Re: Custom Properties via MDG?
Post by: qwerty on February 01, 2016, 09:44:30 am
Ah cool, thanks. This <<diagram property>> thingy, has it been there since a longer time? Never was aware of that.

q.
Title: Re: Custom Properties via MDG?
Post by: KP on February 01, 2016, 09:55:52 am
Ah cool, thanks. This <<diagram property>> thingy, has it been there since a longer time? Never was aware of that.

I believe it was added in EA 11.1 specifically to support BPMN. From the release notes:

Quote
Diagram specific properties for Gateway marker visibility and Activity expanded added
Title: Re: Custom Properties via MDG?
Post by: Eve on February 01, 2016, 09:59:27 am
In addition to KP's comment.

There are a number of profiles that define notational options, and prior to that, the only way a user could set them was via a tagged value. Of course that meant that they couldn't vary the notation on different diagrams.
Title: Re: Custom Properties via MDG?
Post by: qwerty on February 01, 2016, 09:06:36 pm
Cheers :-) i'll have to look into that.

q.