Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Topics - Arnoud_B

Pages: [1] 2
1
In the GUI you can easily add a ChildDiagram to an Element by using "New Child Diagram" either by creating a new Diagram with "Composite Structure Diagram" or linking an existing with "Select Composite Diagram".

I am generating a skeleton set of Diagrams based on my model and I would like to link the created diagrams to 'their' Element. However in the API the attribute CompositeDiagram is Readonly

Notes: Read only
If the element is Composite, returns its associated diagram; otherwise returns null.
Diagram Class

Also from the other side; Diagram object I do not find a way to set this, anybody did this before?

2
I now have a working (very partial) ArchiMate implementation with nice looking elements and the correct relationships in my quick linker by using the "stereotyped relationship" in my profile definition.
However when I nest elements the relationships do not get hidden or at least not always.
If I have a composition between two (the same) elements and I nest them in the correct direction the relationship gets neatly hidden in the diagram. However I have created for instance a realization between my version of a service and an interaction and that does not get hidden when I nest the service in the interaction.
I searched the docs but I cannot find an attribute that influences this behaviour.

3
Well extending ArchiMate3 gives me headaches so I am going another direction; create an MDG from scratch but one of the things to do is to create icon's.
The documentation only tells:
Quote
Contains the bitmap file location of the 16x16-pixel icon displayed beside all elements defined by the Stereotype, in the Browser window. This does not apply to Package elements. The icon is also automatically used as the Diagram Toolbox image wherever the stereotyped element is listed.
That is not very specific, anybody created icons?
What do you have to create a bmp a jpg encode it base64 ... any tips and freeware tools (or even payed tools) people use to do this are more then welcome.

4
I try to get the quick link capability of SparxEA to work in the MDG I am constructing but I am missing something important as whatever I do nothing changes (and as usual SparxEA does not give any hint of what I do wrong).

So what do I do?

In my MDG I created two elements that 'generalise' the ArchiMate MDG elements:
ArchiStib_StandardHardware 'generalising' ArchiMate3::ArchiMate_Device
ArchiStib_PatternSolutionBuildingBlock 'generalising' ArchiMate3::ArchiMate_TechnologyCollaboration
- first image in: https://imgur.com/a/eSazZJ0

Then I add a quicklink configuration as I want the quicklink only to show a "Realization" relation between the two.
Quicklink configuration below!

However if I deploy my MDG I still get the same list as the parent possibilities and my quicklink configuration does not seem to do anything.
- Image in the link above but the second image.
So I most probably did something completely wrong but I cannot find my mistake.


Quicklink configuration:
Class,ArchiStib_PatternSolutionBuildingBlock,,,,Class,ArchiStib_StandardHardware,Realization,,to,,Realization to,TRUE,TRUE,TRUE,TRUE,,0,,,,,
Class,ArchiStib_StandardHardware,,,,Class,ArchiStib_PatternSolutionBuildingBlock,Realization,,from,,Realization from,TRUE,TRUE,TRUE,TRUE,,0,,,TRUE,,
Class,ArchiStib_PatternSolutionBuildingBlock,Class,ArchiStib_StandardHardware,,,,Realization,,to,Realization to,,TRUE,,TRUE,TRUE,,0,,,,,
Class,ArchiStib_StandardHardware,Class,ArchiStib_PatternSolutionBuildingBlock,,,,Realization,,from,Realization from,,TRUE,,TRUE,TRUE,,0,,,TRUE,,

5
I have asked this question in a different treat before but all suggestions given did not help me resolve the issue.
As SparxEA is not very verbose (it does not give you any feedback why things do not work ;-/ ) it is hard to say it I do it wrong or if SparxEA just works differently. So I will try to document my case a bit better and I hope somebody will spot the error.

So what do I do?
I am building a ArchiMate MDG with some specific extensions of standard ArchiMate element that will contain extra attributes and which I can validate with scripts (as different rules apply to different sub types)

In my POC I create an extension of ArchiMate_Device --> ArchiStib_StandardHardware
It 'generalizes' the ArchiMate element and it 'Extends' the UML metaclass. I think I now do that correctly.
https://imgur.com/a/t6MHO3P

I add a shape script (code below) to overwrite the image;
- it makes it a simple rectangle
- it adds a SBB decorator on top in the middle
- it overwrites the decorators device and composite

Well at least I try! overwriting the image with a rectangle works, the extra decorator is there however I have the device and composite decorators twice. Once from this class once from its parent.
(a sniplet of the result is in above image URL)

On the metaclass there is an attribute _HideMetaclassIcon however I do not think there is such an attribute for a stereotype object.
I tried all kinds of things but it is trail and error and it gets me nowhere ...
Any help is highly appreciated.

The typescript code I use:

shape main
{
   layouttype="border";
   noshadow=true;
   defsize(90,70);
   
   //if(hasproperty("rectanglenotation","1")) only rectangle notation is supported
   rectangle(0,0,100,100);
   addsubshape("rect_padding","n");
   addsubshape("name","center");
   
   shape rect_padding
   {
      preferredheight=20;
   }
   
   shape name
   {
      bold=true;
      v_align="top";
      h_align="center";
      print("#name#");
   }
}

decoration device // same icon but on a different place
{
   orientation="ne";
   
   moveto(15,75);
   lineto(0,100);
   lineto(100,100);
   lineto(85,75);
   startpath();
   roundrect(0,0,100,75,30,30);
   endpath();
   strokepath();
}

decoration SBB // new 'icon'
{
   orientation="n";
   
   print("SBB");
}

decoration composite // same icon but on a different place
{
   orientation="se";
   
   if(hasproperty("iscomposite","true"))
   {
      ellipse(0,40,40,60);
      ellipse(60,40,100,60);
      moveto(30,50);
      lineto(70,50);
   }
}



6
Today I amused myself with trying to add a relationship between two elements I created in my MDG.
Both are generalizations of ArchiMate3 three elements and I wanted to add a relationship between them.

This page in the documentation seems to explain how:
https://www.sparxsystems.com/enterprise_architect_user_guide/15.1/modeling/metamodelconstraints.html

However as often if I do just that (or at least think I do it properly) nothing happens. I have been busy most of today changing things replublishing and seeing if something changes however no such luck ;-/

Here is a screenshot of my MDG configuration and the resulting quick link
https://imgur.com/a/GvLLYoI

7
I did some more work on my MDG and I do not understand what gets inherited and what not if you generalise an other element. So I extend a UML root stereotype and generalize an ArchiMate3 stereotype. But I get the following behaviour;
  • Icons are inherited; that is very good as I did not want to change those;
  • The color does not get inherited but that is quickly set
  • The shape script does not get inherited but I have found a way of working on copying the shape script from the original and adapt it and add it as _image in 'my' new stereotype that seems to work well.
  • However the decorators seem to get inherited, I did not notice that at first but I moved the decorator of a device to a slightly different position and now I have two one on the ArchiMate3 location and one on my new location.
I search the documentation but I cannot find what the generalization of another type actually does (and does not). Is that documented somewhere? I am now in trail and error mode which is not really producing results fast  :-[
I really do not want to inherit the decorator from the ArchiMate3 class or at least I want to be able to overrule its shapescript and not have two.

8
Automation Interface, Add-Ins and Tools / Add 'tags' to diagram object
« on: December 10, 2021, 10:43:55 pm »
I have scripts to align and resize my diagrams how ever sometimes I want to tell the script to skip an diagram object or do something a bit different from the standard script behaviour. So I added tags to influence that behaviour and that works. However the tag is on the element itself and not on the diagram object. So if I want one type behaviour on one diagram for an element and another type of behaviour on another diagram my implementation does not support that.
Is there any way to attach information to the diagram object 'wrapping' the element on the diagram that would fix my problem.

9
Sorry forum, I feel sometimes (well actually often) rather stupid trying to get things in Sparx going. Although the documentation is not bad it is never complete and understandable for me.
So I have another dummy start-up question:
I have created a MDG Technology model and create a profile package where I extended some ArchiMate 3 elements but for now only giving them new names.
Now I want to add them to a toolbox (and later create a diagram type to use them on)
So I create a toolbox package and a toolbox page and with the "edit with profile helper"; "Add"; "Add Stereotype"; I select my 'new' element from the <<profile>> package click OK AND ... nothing happens no error but also nothing added to my toolbox page. I now read the instructions 4 times in 3 days and I feel that I miss the obvious (again) but I am clueless what I do wrong.

10
I am starting to create an MDG to extend the ArchiMate 3 implementation to support our specific use (mostly restrictions on the full syntax to allow for less mistakes) of ArchiMate 3.
One of the things I like to do to adapt/decorate the existing ArchiMate shapes and I searched in the forum and although I found a lot of things related I did not find an answer to my question.
If I understand correctly the Archimate3 shapes are not the best in the world and some people start completely over. I am not ready to do that (lack of time) and I am ok with the current implementation and only want to adapt a small number of things (for now).
I understand that inheritance won't work:

Code: [Select]
shape main {
    DrawParentShape();
}
decoration LetterA {
    orientation = "NE";
    print("A");
}

So I have to create my own script that will completely overwrite the existing one (not the best of OO practices but it will work).
If that is true I would like to retrieve the existing shape script code and edit it, however I do not know if I can 'steal' the current shape script code from the Archimate MDG in some way. What I figured out is that I can 'cut' the base64 code from the XML of Archimate 3 and then paste it in my stereotype but that seems a bit 'crude'.

11
General Board / Find in Project by ElementID or ElementGUID
« on: November 18, 2021, 09:46:29 pm »
I have (again) a very simple question however I do not find a solution that is simple so I am afraid I miss something obvious in SparxEA.
I have scripts checking my model and they log errors and in the log I have the ElementID or ElementGUID as the name of the Element is not unique in my model (In the script I have the element object so I can log any attribute that is useful for a search).
However if I want to search in my project (simple ctrl+F) I can only search by name (which is useless as I get multiple hits and I do not know which is the correct one) and not by an ID.
Is there an easy way to do this? or should I write my own query (I am not very used to doing that but if I have to learn I'll teach myself)

12
PCS General Board / Link from WebEA to external URL
« on: October 13, 2021, 11:04:03 pm »
Hi, We are starting to use WebEA to expose our architecture diagrams to our community. If you correctly link child diagrams the navigation through WebEA can be really smooth and easy to retrieve information. However not all our documentation is actually a SparxEA diagram, the details of things are in our (Confluence) WIKI or even a document stored on SharePoint. You can of course add the URL for this in the description of the element so you can cut and paste that URL in your browser but it is a bit a "poor man's solution".
Is there another way to add an external URL to an element in SparxEA so it becomes 'clickable' in WebEA?

13
In a drawing it is very straightforward to create a connector between an element and a connector.
However I do not understand how I can do this with a script.
A connector does not have a Connectors collection to add something to;
And if you use the connectorID as value for the SupplierID of a newly created connector it does not get created either.
The main data model of connector only shows a connector linked to an element not to a connector.
I did some debugging and when I inspect a connector linked to another connector the SupplierID is not at all the value of the connector it is linked to.
So I think there is an Element in between linking the connector to the connector and this Element is not visible as such.
However I can find no reference in the documentation if my suspicion is correct and if so which type of Element should be created to link the two connectors.
Anybody did this and can maybe submit a code sniplet?

14
https://www.sparxsystems.com/enterprise_architect_user_guide/15.2/automation/diagramlinks.html
The class is actually not DiagramLinks but DiagramLink; the collection holding multiple such object in the Diagram is called DiagramLinks.
So the implementation is logical only the documentation is not fully correct.
Is this the place to alert Sparx to this or is there another way to submit such a (minor) issue.

15
A Diagram object has a SelectedObjects function returning all the DiagramObjects that are currently selected.
However it does not have a SelectedLinks function returning all DiagramLink objects that are currently selected.
Instead it has a SelectedConnector function returning the Connector wrapped in the selected DiagramLink object. It only returns one while you can select multiple diagram links but then SelectedConnector returns null.
So my script only works when you select one connector at a time ...

Pages: [1] 2