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.

Messages - Sunshine

Pages: 1 2 [3] 4 5 ... 46
I've had this problem of showing several instances of the same archimate element on one diagram.
Originally I created this script to create multiple diagram elements pointing to the same element.
Code: [Select]
option explicit
'!INC Local Scripts.EAConstants-VBScript
' Script Name: Add Element to Diagram
' Purpose: This adds the currently selected element to the currently visible diagram
' Date: 11/08/2010
sub main
       Dim currentElement as EA.Element
       Set currentElement = Repository.GetTreeSelectedObject
       Dim currentDiagram as EA.Diagram
       Set currentDiagram = Repository.GetCurrentDiagram
       Dim diagramID
       if ( currentDiagram is Nothing ) then
              Session.Output("No Current Diagram Selected")
              Session.Output("Adding " & currentElement.Name & " to " & currentDiagram.Name)
              diagramID = currentDiagram.DiagramID
              Dim currentDiagramObject as EA.DiagramObject
              set currentDiagramObject = currentDiagram.DiagramObjects.AddNew("l=10;r=130;t=10;b=82", "")
              currentDiagramObject.ElementID = currentElement.ElementID
       end if
end sub
Initially that worked but after a few Sparx EA versions later it didn't work so well.
So now I have resorted to creating an instance of the ArchiMate element similar to a UML instance of a class. I had to create stereotypes with shapescript for the instance so it looked like the ArchiMate element. I put all the instances of the ArchiMate element under the original in the project explorer. Seems to work but kind of a hack.

Mixing Archimate and UML IN THE SAME MODEL is not a good idea IMHO.  Each has its place, but their metamodels don't play nice together, so.... good luck???

Well we use both ArchiMate, UML and BPMN together in harmony in the same model for different levels of abstraction required in doing both Enterprise Architecture and Solution Architecture. There are a few papers on using these three notations together and its not rocket science.

General Board / Re: Diagram alignment helper lines
« on: September 07, 2018, 06:49:03 am »
Yes, they are blue, I somehow remembered them being red.

Thanks KP, that worked. I would have never found that option by myself.

Me neither!
Me neither ???

Perhaps if you could share the full shape script we might be able to help.
Also if you could share what version of Sparx EA you are using that may help too.
If you right click on the text you get a context menu for text alignment and you can make it left, center or right justified.

XMI export and Import would be the way I'd do it as described by Geert.

General Board / Re: Code generation to multiple langages
« on: August 28, 2018, 06:24:39 am »
Actually, our current baseline is a C# datamodel with no UML to start with.
This is why I initially did initialize the PIM from the C# code base.

At some point in time, we will do a PIM-first developpment and generate the C# (and other langages) from a PIM.
In that case you should do C# to PIM transformation. Then you have a path for creating the other PSM.

You can create a stereotype and associate a shapescript with that stereotype. The shape script can create custom compartments. See for examples
and page 164 of the MDG technologies guide for more details

General Board / Re: Code generation to multiple langages
« on: August 27, 2018, 06:57:00 pm »
The way model driven approach is intended to work is you have one platform independent model (PIM) from which you can transform to multiple platform specific models (PSM) and from those models generate code. The platform Specific Models are technology specific such as Java, C#, XML, DDL

For example with one PIM you would transform to several PSMs and then from those generate code.
PIM-> PSM (C#)-> C# code files
PIM-> PSM (Java) -> Java code files
PIM-> PSM (C++) -> C++ File
PIM-> PSM (DDL) -> DDL File to create a DB schema.

The language for all the elements in the PSM should be set in the PIM -> PSM transformation.

Sounds like you are trying to start with a data model then generate several code files which isn't the correct way. If your trying to change the language then your probably not doing it correctly.

There are plenty of books out there for you to read on the topic of Model Driven Development and Model Driven Architecture.

Hope that helps.

Bugs and Issues / Re: Diagram element Align keyboard shortcut don't work
« on: August 22, 2018, 11:00:10 am »
We've had a lot of fun when people leave their machines unlocked by software rotating one monitor, physically rotating the other, and changing their mouse to left handed.
That sounds like a good one. Must try it.
We send out an email inviting everyone to free drinks down at the local pub when they leave their computer unlocked. But that's getting old now :) 

Related to this topic,  I seem to have lost the Relationships Window off-screen.  How can I get just this window back onto a visible screen without affecting the others?

I tried "futzing" with the workspace setting file from a Workspace where the Relationship window was visible and on-screen but to no avail...

Oh boy I feel your pain. Had similar issues with resolution with my Lenovo Yoga and Sparx EA Resorted to setting the laptop screen to the same resolution as the desktop screens. I think with the new QHD resolutions Sparx EA has some scaling issues. I reported this earlier this year and thought they had fix it.

With regard to the relationship window you might be able to use the windows keys to move the window. Sorry working on my Mac at present so can't try any of these to double check.

option 1.
Hold down the ALT key.
Press M (Move).
A 4-headed arrow will appear. When it does, use your arrow keys to move the outline of the window.
When you are happy with its position, press ENTER.

Option 2
Press and hold the Shift key and right-click the app's taskbar icon.
Select Move in the context menu.
Use the left, right, up and down arrow keys on the keyboard to move your window. When you have moved the window to the desired position, press Enter.

Option 3
Press Alt + Tab and select the app's window thumbnail. The app window will become active, but still not visible.
Press Alt +   Space  , then press M. This will activate the Move option of the window.
Use the left, right, up and down arrow keys to move your window. When you have moved the window to the desired position, press Enter

Option 4
Alternatively try disconnecting the monitors and the windows might align into visible view on the laptop screen.
Pin the window within the main window of sparx EA then connect the monitors again.

You could look at the HTML template and modify it to change the order.
You can create a new template that copies all the default template where you can then change it.

Configure > Reference Data > Resources > Document Generation > Web Style Templates

Create a new Web Style Template and have a look at the Javascript part of the template. I think the javascript creates the tree and so it controls the order. There are around 1085 lines of javascript. If you search through that you may be able to find and change the order.
Caveat is that you need to know JavaScript and HTML as it gets quite heavy.
Sorry don't have the time to find the exact line of code for you.

Bugs and Issues / Re: Notes for class attributes
« on: August 18, 2018, 09:12:45 am »
I like it  :)

We cannot use headings to indicate our requirements. And so they were reserved for the Chapter. Although, there are some ideas, but it adds to the work. But well, i think it's good idea to test MDG. Maybe maybe. ???

No, we can't import tables because of different languages, EA just throws garbage, and you can't change UTF when importing CSV. But if someone knows how it can be organized, I will be glad.
Okay so it sounds like you haven't given us enough info to help you.  The example you provided looks like headers were being used for requirements. Don't you what your reference to chapters are. I'm total confused and have no idea what your MS word doc looks like now so your going to have to explain further.
Sounds like your requirements maybe written in a language other than english is that correct?
Do you have any programming/scripting skills ?

Time travel is beyond my skillset

Don't under estimate yourself. You are travelling forward into the future one second at a time.

Try this:

  • Modify the "DDL" Template (Design -> Tools -> Transform -> Transform Templates)
  • Replace: type=%qt%%CONVERT_DB_TYPE(genOptDefaultDatabase, attType)%%qt%
        type = %qt%varchar%qt%
        length = %255%qt%

And see if works.
Wouldn't that make ALL columns of type varchar(255)?

Your right Geert. There needs to be some kind of %if ...% statement. However looking at the MySQL DDL transform it looks like
modification of a few lines DDL Data Type (lines 24 to 26) might be the answer as that looks like it sets the length to 0 there.
Code: [Select]
%elseIf $Type=="varchar" or $Type=="nvarchar" or $Type=="varbinary" %
However isn't the point of varchar is that it has a variable length otherwise just use char and fix the length.

General Board / Re: Performance problem or what?
« on: August 18, 2018, 08:21:28 am »
If everything is the same bar the AD then it kind of points to that. Maybe AD is involved in authorising each request to the DB and one AD is slower at responding. Not sure how it all works under the hood but may be AD is involved in validating security tokens on each request to the DB.  You might be able to find out some kind of message sequence diagram via google to help understand how DB requests and AD interact for authorisation.

Networks can also be set up to give different qualities of services and that might be dependent on which AD users are on.

If you want an approach to problem solving look up Kepner Tregoe. It helps to work through the logic and isolate root cause. I've used it a lot over the last 25 years and it was really useful.

Pages: 1 2 [3] 4 5 ... 46