Sparx Systems Forum
Enterprise Architect => Automation Interface, Add-Ins and Tools => Topic started by: L.Krobot on August 04, 2015, 11:43:09 pm
-
Hi,
does anyone have the shapescript for "Requirement" element ?
or, does anyone have shapecripts for: displaying Notes and Parent Package in the same way as EA is doing for the Requirement element ?
thx
-
The EA requirement is native. It does not use any shape script.
Actually I don't know what you're after. Can you post a picture?
q.
-
Hi querty,
here is the image (second shape) ...
(https://2908bcce-a-62cb3a1a-s-sites.googlegroups.com/site/ljkrobot/home/requirements/requirements.PNG?attachauth=ANoY7crZKFRDQ8YqE95WHroh5jJeAirqI2WZSdlKXQpq5CAXNNQZE2KLQVNpUvMLgz1i_seA9eznZKDqGXHAbHYfXTlKcdDy25unm4S9nE2ExV5qFJ5IQVntsk6EIVoFGL2taaqIo4dxbPG2cFyH2hMcPXqOjApc7EvNlp8wzhsKjRKMHIn7NBmEuG_MIBnn_W1fT_mbZZB_AIHFC-snVhyLJEXc2AMAm2T72FrVGWe5st-ZLLlTvrQ%3D&attredirects=0)
basically, i'd like to create my own shape that has the same (similar) behavior as "Requirement" element ...
- be able to show/hide Notes (including formating and autosizing of the shape)
- be able to show the parent package (namespace) in the case that element is not in the same package as diagram
thx & rgrds,
ljk
-
I just see the notes compartment which can be turned on in the diagram/Elements properties page. The name space can also be turned on in the diagram/General settings.
If you want to mimic the layout note that shape script does not allow to draw fixed size elements. The stripe at the left will always resize with the whole shape unlike Requirements where they are fixed in size.
q.
-
thx querty,
the real reason why we need this, is that we are developing MDG technology that will extend Archimate,
and we need to create (extend, modify) standard Archimate element shapes in order to mimic the "Requirement" element (shape) behavior ...
BUT, with Archimate (or any shape that we would like to create) this is simple not possible (at least we do not know how, we was not able to do this with any script that we try to develop);
even more, i.e. if you take the original Archimate "Business Process" element, and you want to show Notes or Namespace on any diagram, this does not work !
so, our idea was to take "Requirement" element (shape) and replicate its behavior (shapescript) to either our MDG elements or directly to the Archimate elements ...
any idea (maybe shape script example) on how to achieve this ?
thx & rgrds,
ljk
-
basically, once you add shapescript to an element and you do not call DrawNativeShape(), and you cannot do this if you need your own shape, the original behavior (Notes & Namespace) is lost ...
we would like keep this behavior (get it back or replicate in some way), as we need it, as well as we need also different shape, but we do not know how to do this ...
-
The notes can be printed with PrintWrapped("#NOTES#"). I don't know of a direct method to retrieve the name space. Likely you have to write an add-in so you can retrieve it like Print("#addin:myAddIn,param#").
q.
-
You can reverse engineer the shape script from the mdg technology file.
It is stored as a zipped, base64 encoded string.
Decode and unzip and you have the shape script in clear text.
Geert
-
Hi Geert,
I did this with Archimate and basically with all MDGs that I have found in "C:\Program Files (x86)\Sparx Systems\EA\MDGTechnologies" directory, but unfortunately I did not find anything that has the behavior we need.
the suggestion from querty (addins) would work, but we cannot use it, as many people are using only viewer, and we want to deploy only MDG inside of the model (without the need for any addin).
btw, we'll try to find something different or survive without ...
rgrds,
ljk
-
thx querty,
the real reason why we need this, is that we are developing MDG technology that will extend Archimate,
and we need to create (extend, modify) standard Archimate element shapes in order to mimic the "Requirement" element (shape) behavior
[size=14][SNIP][/size]
thx & rgrds,
ljk
Hi ljk,
We are doing something very similar (extending ArchiMate). I can't see the diagram you posted, so I'm "flying blind", but from your discussion you seem to want to mimic the Sparx Requirement element. Out of curiosity, why aren't you using the ArchiMate Requirement shape from ArchiMate 2 - Motivational Aspect?
We will be shortly expanding the Requirement methodology - using the ArchiMate Requirement shape. As you've found, you can use the Sparx version of the shape as a "Starting point" for your version.
Paolo
-
I don't know of a direct method to retrieve the name space. Likely you have to write an add-in so you can retrieve it like Print("#addin:myAddIn,param#").
Fair enough, it was only recently added. You have a couple of options in v12.
printwrapped("#qualifiedname#");
Prints a qualified name much like a class does.
if(hasproperty("packagepath",""))
{
}
else
{
printwrapped("(from #packagepath#)");
}
Emulates the behavior of other objects, showing the source package if being shown in a different package. I believe it also obeys the display option for showing fully qualified package paths. Just put it under the element to match default behavior.