Book a Demo

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

Pages: [1] 2 3 ... 51
1
General Board / Forum Very Slow to Load
« on: February 25, 2026, 10:51:46 pm »
Over the last couple of days I have found the pages on the forum very slow to load / reload.

Has anyone else noticed this?

Phil

2
Try this code to replace your lines 13,14 and 15

Code: [Select]
var itemID = Info.Get(0);
var theElement = Repository.GetElementByID(itemID);

Phil

3
Hi

Now there's a throw back to past EA times!

As far as I remember the Workflow script were (are) very limited to the element properties that can be checked, and often these were not the ones that get changed!

I have used Model-based add-ins to validate element property (in my case the Name) changes using

EA_ContextItemChanged https://sparxsystems.com/enterprise_architect_user_guide/17.1/add-ins___scripting/ea_oncontextitemchanged.html
Here I make a note of the current property values

EA_OnNotifyContextItemModified https://sparxsystems.com/enterprise_architect_user_guide/17.1/add-ins___scripting/ea_onnotifycontextitemmodified.html
Here I validate if the changes are allowed, if not, then the properties are restored to the saved values.

You may have to experiment in the code on how to extract the data within the broadcast event parameter(s), they appear to be available via
Code: [Select]
Info.Get(0) where 0 is the first parameter etc. Alternatively something like:

Code: [Select]
var item = Repository.GetContextObject();

if (item == null)
{
Session.Output("No element found!");
return;
}

// Do we have an element
if (item.ElementGUID != null)


May work.

I am sure there are other methods to achieve what you are seeking.

Hope this helps

All the best

Phil

4
Automation Interface, Add-Ins and Tools / Re: Report Generation Webinars
« on: October 30, 2025, 08:45:08 pm »
Hi Matt

Essentially a Template fragment works in two modes
  • "normal template fragment" use the selectors as you would do normally
  • "script or query driven" template only use custom as the selector

Personally I only ever use script driven fragment using JavaScript to extract the Custom Fields into XML ready for insertion into other template(s).
The Custom Fields are user named and are the names of variables returned in the JavaScript.

The same technique also applies to SQL Driven scripts (which I have not used)

For a "normal template fragment" I would try the following:

Let's assume  that the Template Fragment extracts details for a Use Case Element. Then the selectors for the template fragment would be
Package
           Element

(Child packages if you want as well)

Add text, and fields as usual.

Invoke your template fragment in your "master template" within the element section. When the template is called, the element ID will be passed to the template fragment.

Hope this helps

All the best

Phil


5
Automation Interface, Add-Ins and Tools / Re: Report Generation Webinars
« on: October 29, 2025, 12:06:29 am »
As the presenter of the webinar, many thanks for your feedback.

If you could be a bit more specific as to the issues you are facing in EA v 17.1 I will do my best to help you out.

Phil C

6
I believe the major challenge will be that in UML a port is an owned child element whereas in AcrhiMate the ApplicationInteraction is a separate element associated with an ArchiMate ApplicationComponent element.

A scripted solution maybe possible, creating relationships (trace?) between the UML elements and their respective ArchiMate elements, in a similar manner to that used by Time Aware Modelling. This could create the elements and their traceability, but creating the ArchiMate version of the diagram,  :-\, The script could "clone" the diagram, then iterate the elements on the diagram performing the transformations as necessary, but this still raises the issue of nested ports in UML, versus separate related elements in ArchiMate. It maybe be easier to script the element changes, then create the ArchiMate diagrams manually.

Best of luck

Phil

7
General Board / Re: How to use Relationship matrix in RTF template
« on: August 30, 2025, 01:35:55 am »
Not good news I am afraid :(

This confirms what I have experienced, taken from the EA User Guide

If you have set up matrix profiles directly within the Relationship Matrix, you do not directly specify a matrix profile in the report; the Document Generator returns the Relationship Matrix for all profiles that include the documented Package as the source or target Package.

IMHO including ALL profiles where the package is either a source and/or a target makes this option not practical.

Phil

8
Is this option checked in the Diagram section of the diagram properties?

Add each contained element in Documentation

Select this checkbox to include documentation on each element in this diagram, in any document report generated on the parent Package or element.


Just a thought

Phil

9
Automation Interface, Add-Ins and Tools / Re: Session.Prompt Dialog
« on: June 26, 2025, 07:36:21 pm »
Hi Shimon

This topic come up in another thread and a solution (workaround) was posted by Guillaume:

Use this piece JavaScript in an operation within you model based add-in Class :


//      0 -> OK button
//      1 -> OK/Cancel buttons
//      3 -> Yes/No/Cancel buttons
//      4 -> Yes/No buttons
// Returns a value matching the clicked button:
//      1 -> OK
//      2 -> Cancel
//      6 -> Yes
//      7 -> No

style += 4096;
var WSH = new COMObject("WScript.Shell");
return WSH.Popup(prompt, 0, title, style);


I have tried it and it works perfectly! With the advantage of displaying text of your choice in the dialog title bar :)

Phil

10
The problem with GetContexObject is that the object could be selected anywhere, including the browser, so I suggest you use this method to get the GUID (or ID) of the selected object, then use Diagram.SelectedObjects, iterate and select the matching object from GetContextObject (if no match then the object has been selected else where).

That should get you to the element (object) you are after

Phil

11
Thanks! Will check that out

Phil

12
I know its an old thread, but the following is relevant to something I am working on:

Query usys_system.Default_Diagram. It should contain the guid of your diagram

Which table is that? I can only find tables that begin with t_

I am looking for where the default diagram is set within the repository tables.

Phil

13
Bugs and Issues / Re: EA v 17 xml import links missing
« on: March 03, 2025, 09:29:27 pm »
Thanks for your reply

Yes you are correct in that an export / import via Native works perfectly ... however when the Model Builder (wizard) attempts to import a Native XML file ... nothing is imported  >:(

This Model Builder bug is my main issue.

All the best

Phil

14
Bugs and Issues / EA v 17 xml import links missing
« on: February 18, 2025, 11:29:17 pm »
Hi All

Not sure if anyone else has experienced this bug:

1) Create a small qea repository containing two diagrams, drag one diagram onto the other as a Navigation Cell. All works as expected.
2) Export this repository to xmi v 2.1
3) Create a new qea repository and import the file created in 2) above

The navigation cell does not have it Hyperlink property and hence no longer works as expected  >:(

I have also observed that composite activities and interaction occurrences also loose their links when imported  >:(

Will report as a bug.

I am thinking of a script to fix the import, but cannot find where in the repository the Navigation Cell hyperlinks are stored. I thought it would be t_xref, but does not appear to  be the case. Does anyone know where Navigation Cell hyperlinks are stored?

Thanks
Phil

15
Hi All

I have achieved this via a Model Based add-in, but as Geert says it is NOT trivial.

In addition to creating a Text element with a subtype = 76, all the legend stuff is located in t_xref with a specific ; delimited string and the RGB values must be stored in EA's own integer values this entry is then cross referenced to the Text element. This requires a new entry per legend to be created in t_xref with each having its own GUID.

Phil

Pages: [1] 2 3 ... 51