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 - roman104

Pages: [1]
Hi All,
Thank You for this topic, It helped me to put the 'Package Hyperlink' on current diagram

Please, don't forget Reload the diagram at the end of all actions.


Example: This script is located in Diagram scripts group.

option explicit

!INC Local Scripts.EAConstants-VBScript

' *********************** > SCRIPT SUMMARY < ************************* 01-DIA-PackageHyperlink
'> Script Name:   01-DIA-PackageHyperlink
'> Author:       Roman Kazicka
'> Purpose:    Better navigation in model repository via diagrams
'>            the goal is to automatically generate hyperlink to package on current diagram
'> Category:   Model Navigation
'> Description: Create on visible Diagram 'PackageHyperlink' to current Package in 'Project Browser'
'> Trigger:      Via context menu in current diagram
'> Input:      Selected Package in ProjectBrowser, Open diagram on which will be created hyperlink
'> Output:      Package hyperling on current diagram  with note #ModelNavigation#
'> Date:       20181007
'> Notes:      
' TODO 1:

'__________________________> Script Summary < ____________________________01-DIA-PackageHyperlink
' Script Name:            01-DIA-Package Hyperlink
' Author:                Roman Kazicka
' Purpose:                Better navigation in the model via diagram Package Hyperlink
' Description:             
' Trigger:              via script in Diagram, (the same thing can be done via Project Browser script with the same name 01-PB-PackageLink
' Date:                2081006

' Diagram Script main function
sub OnDiagramScript()

dim currentDiagram as EA.Diagram
set currentDiagram = Repository.GetCurrentDiagram()
' This check is valuable in run mode
' Diagram have to visible
if not currentDiagram is nothing then
 dim  thePackage as EA.Package;

dim  newHyperlinkel as EA.Element;

set thePackage= Repository.GetTreeSelectedPackage()
set newHyperlinkel = thePackage.Elements.AddNew("$package://"& thePackage.PackageGUID , "Text")
      newHyperlinkel.Subtype = 19 '// This one is important for hyperlinks to packages!!
      newHyperlinkel.Notes = "#ModelNavigation#"

  AddElementToDiagram newHyperlinkel, currentDiagram
'If diagram is not visibe -
Session.Prompt "This script requires a diagram to be visible", promptOK
end if

end sub
sub AddElementToDiagram(theElement, theDiagram)

      dim diagramObjects as EA.Collection
      dim obj as EA.DiagramObject

      set diagramObjects = theDiagram.DiagramObjects
       set obj = diagramObjects.AddNew( "l=200;r=400;t=-300;b=-400;", "TEXT" )
  set obj = diagramObjects.AddNew( "", "TEXT" )
      obj.ElementID( theElement.ElementID )
      obj.Style = "BackColor=-1;BorderColor=255BorderWidth=1;FontColor=-1;VSwimLanes=1;HSwimLanes=1;BorderStyle=0;"

      Session.Output("Added object " & theElement.Name)

end sub




I am the same problem.
But re-installation of MDG did not help.
OS. Microsoft Windows [Version 10.0.14393], 64 bits.
MDG : mdgoffice64.msi

MS Office 2016
Screenshot with Error message is here This is Error message screenshot
The problem is with all MS Office application, Word, Excel, Powerpoint, Visio.
Any suggestions?
Thank You in advance

Yes the select works as it is written.
But my problem is, that I have defined in element more Tags values. Eg. Tag Name ProjectID. The select returns Table with 2 Columns:
Tag, tag Value. It is correct, but I need very strange thing. I need from TagValue to  create Table column Name.
It is some solution which is using select for creating new table with columns name created from TagValue.
But I am not able to modify my select in this way neither in ea clilent or in MySQL wokbench...


I am trying to collect data for 'project work evidence' process based on 'resource allocation' feature. I would like to record on with 'ProjectID' resources spent their time, by which 'ProjectActivities'. So I have added new Tag into special elements for collecting the timesheet records.
Values from resource allocation and tag values I would like to use as primary data in Pivot table.
Problem is, that 'My search' returns 'Tags name' and 'Tag value' as Column names, and I need special column for every 'Tag Value'. It is possible via sql command 'create table as select'... (see
But it doesn't work for me. Maybe this sql command is not supported in EA at all?

My SQL search is:
 select t_object.ea_guid AS CLASSGUID, t_object.Object_Type AS CLASSTYPE,
t_object.Object_ID,t_object.CreatedDate as CreatedDate,
t_objectresource.[Resource], t_objectresource.[Role], t_objectresource.DateStart, t_objectresource.DateEnd, Round(t_objectresource.[Time]/60) AS AllocatedHours,
(t_objectresource.[ExpectedHours]/60)As ExpectedHours, (t_objectresource.[ActualHours]/60)As ActualHours, t_objectresource.PercentComplete, t_object.Name, t_object.Alias, t_objectresource.Notes, as Tag, p.value as TagValue
from t_objectresource, t_object
INNER JOIN t_objectproperties p
ON t_object.object_id = p.object_id
where t_object.Object_ID = t_objectresource.Object_ID
and p.Value LIKE '#WC#<Search Term>#WC#'

How to adopt this SQL statement in internal EA Search?

Thank You

I am preparing presentation and I would like to trigger  different 'diagram filters' via hyperlinks located directly on diagram.
It could be possible to define the dynamic navigation over diagram.
I searched this feature in current hyperlink element in 'Hyperlink Type' EAcommand, or othe type.
Nothing found.
It could be similar type like Type Search, wher we could select 'Filter group' and 'Filter name'.
It would be great!
Thank You

Hi Geert,
I have tried the script. It looks very comprehensive.
It seems to me it doesn't work for me in this moment.
Probably due to fact, it works directly with element attribute 'stereotype'.
I have found that I have to impact the   Attribute 'FQStereotype'.
I haven't found the method in element class to change this attribute directly.
That means it could be managable via method to change/rename stereotype, but argument have to contain reference to profile.
My stereotype name is 'AMT_DT_GDT_GenericDiagramTable_Object'
in both profiles is the same.
Full Qualified name are:

Old FQstereotypePath: 'Profiles for ATM-KPI-3.1::AMT_DT_GDT_GenericDiagramTable_Object'
New FQstereotypePath: 'Profiles for ATM-KPI::AMT_DT_GDT_GenericDiagramTable_Object'

When I have used Your script, with arguments above it didn't change the FQstereotypePath.
Maybe due to :: in the arguments.
API function for working with stereotype it could work. I need to try.
Thank You very much

Hi Geert,
Thank You for Your reaction,
I am trying this code and give You feedback.

Hi Sunshine,
Thank You very much for Your answer.
I appreciate this.
Unfortunatelly, I cannot make use most of them.
a) Re-synch the stereotypes or
In moment I do re-synch stereotypes (via toolbox after importing modified MDG), all existing instances (about 800) will lost its element script shape.
The user will be afraid that something is wrong. remedy is very simply.
Click on element, select stereotype, select profile, select stereotype. OK. It works.
But it take approximately 10-15 seconds per element...
b) Set the stereotype value using stereotypeex using jscript/vbscript and the API.
I need to verify, if this attribute is R/W and if it will accept stereotype defined in MDG.
c) Export to CSV then import guid, name, object_type and stereotype fields preserving the hierarchy.
This approach seems to me very complicated and time consuming. It shold be less than 5 hours. This is expected time for routine remedy. :o
d) Try making copy of respository and change the column(s) via SQL.  Usually I create a new object to see what the columns are populated so I have a half decent chance  of making mods to the DB correctl

This approach it seems to me straightforward, but with respect that could be side effects.
Not technically, but via possible accidentally human error.
Playing on production data in SQL. But it could be done in 2 steps.
1st in test environment, and after success tests into production.
I have another constrain. The repository is in MS SQL and I have no direct access to it.
We are accessing repository via cloud services.
e) Brute force
Simple, secure,  "stupid" routine work... but predictable time, predictable results...

Currently I will try to test the script which mentioned Geert, and sent feedback to YOu.
Thank You very much.
Have a nice day

Hi all,
During the lifecycle of MDG I was forced to change the name of Profile. The names of stereotype are still the same.
Side effect of this is, that all instances has lost references to correct stereotype in modified MDG in production model.
I can correct it in 2 clocks on every element impacted by this change.
Problem is , there is approximately 1000 affected elements.
I am looking for the way, how to automate this issue.
I have found element attribute FQStereotype, but it is R/O.
I could change the attribute in database directly, but I am afraid of side effects.
Do You have some ideas, how to automate this ?
Thank You very much

Hi ea friends,
I would really appreciate the new feature of hyperlink.
I am using 10ths of models in parallel.
I would like to have one navigation diagram with links to different repositories/models.

It should link to model repository (Eap/ODBC/Cloud Services).

Clicking on the link the new instance of EA client would be started.
I can do this via save model shortcut now.
1. I have to have shortcuts on my local filesystem / how to share them among the team members?
2. If I drop the shortcut to diagram, I cannot edit it.

"Save as shortcut" is very useful but the same functionality would be better to realize via Hyperlink.
I would like to have one way to link to different objects = file, web, help, repository.
It would be consistent approach for navigation/links...

What do You think about this?
Have a nice modeling
Roman  :)

I have read all joomla related item in forum.
I have followed all instructions in guides...
I have tried it on different machines, with different configuration (XAMPP, Bitnami)
But I have another issue.
I cannot change default configuration on ea client site.
e.g. I cannot run apache on default port 80. How can I change the default setting for port?

Hi EA Friends,
I am facing very strange Warning while working with MS SQL based Repository accessible via Sparx cloud services.
Screenshot is in attached pdf file.
I have never got this message with My SQL.
Do You have the same experience?
It seems to me, it is feature ...
Thank You
Have a nice modeling

Hi EA friends,
I am trying to publish our model into joomla (EA13.007).
I am going step by step as in web instructions

from 15:00 minutes.
The results is error pop up message:
Database connection error
Reopening connection to database.
Details about components versions, and screenshots from error messages are in this link

Do You have the same experiences?
I haven't found in MySQL joomla scheme any changes.
I haven't found in joomla destination folder (C:\xampp\htdocs\eajoomla) any changes.
Is It documented which folders, which table are affected by EA joomla publishing?
Thank You in advance

Hi EA friends,
I am trying to publish our model into joomla (EA13.007).
I am going step by step as in web instructions

from 15:00 minutes.
The results is error pop up message:
Database connection error
Reopening connection to database.
Details about components versions, and screenshots from error messages are in this link

Do You have the same experiences?
I haven't found in MySQL joomla scheme any changes.
I haven't found in joomla destination folder (C:\xampp\htdocs\eajoomla) any changes.
Is It documented which folders, which table are affected by EA joomla publishing?
Thank You in advance

Suggestions and Requests / Re: Cloud Connection list
« on: July 27, 2016, 08:59:08 pm »
I am missint cloud connection management tool as well.
I am using tenth of models in cloud.
I would appreciate to extent e.g. the functionality of hyperlink with definition of connection parameters of model in cloud, (or db).
I would have one central model, where i would have a navigation diagram with links to all my models in DB, local files, and clouds...
It would be really useful.
Thank You

Pages: [1]