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

Pages: [1] 2 3 4
General Board / Re: Bulk creation of relationships
« on: July 17, 2024, 10:24:54 pm »
With EA SaaS I mean that the EA client also runs on a computer in the cloud.
We connect to the EA client via the browser.
Any files accessed by the EA client also reside on the cloud host.
This also means that an application running on my own pc has no access to the EA application running in the cloud.
So the im/exporter from Geert doesn't work either.

I assume my scripts are PCS compatible as they are running within the EA client, as other scripts.
And yes, there are scripts to im/export Elements as well as Connectors.
The Element export also exports the ElementID which can be used to import Connectors as they are relationships between ClientID and SupplierID.
I also tackled the handling of ArchiMate stereotypes for both Elements and Connectors.

Also the scripts are available for starting from a package or diagram defining the scope of the export.

Strange, can't recall changing any settings regarding JavaScripting.
In my configuration, after setting the '.' (dot), the editor shows a pop-up with both methods and properties.
All in one single list, sorted alphabetically.
There is a difference in the color though.

General Board / Re: Bulk creation of relationships
« on: July 17, 2024, 02:23:16 am »
As the Excel option is a bit cumbersome to use with the EA SaaS solution, I created some JavaScripts to do the import/export via an Excel.
Any suggestions for improvement are welcome.

I do not know how to turn that feature on.
I do know that the internal JavaScript editor within EA is capable of autocompleting both methods and properties.
So I usually try to either copy/paste code or add the property by the autofill of the editor.

As Geert said, check your spelling.

In line [3], you are using a non-defined property "Steretoype".
In line [6], you are assigning this non-defined property a value, thus making it defined.
In line [9], this does not generate an error because you defined the property in line [6].

Sometimes it is nice to have weak type-checking, sometimes it is not...

Sorry, but I think you are mixing Stereotype and StereotypeEx (apart from the typo):

Code: [Select]
currentElement.Type = "Class";
currentElement.Stereotype = "";
currentElement.SteretoypEx = "ArchiMate3::ArchiMate_Requirement";

I think it should be:

Code: [Select]
currentElement.Type = "Class";
currentElement.Stereotype = "";
currentElement.Stereotype = "ArchiMate3::ArchiMate_Requirement";

According to the documentation StereotypeEx is a list of Stereotypes (see

Bugs and Issues / Re: EA stability
« on: July 11, 2024, 05:00:15 pm »
Sorry if this is a silly question, but... how do you get that error log?
Need to define some settings? Available in a specific log file somewhere on disk?

Sorry Geert to have misinterpreted your code.
The hint I got from it turns out to work now.
I dreate a new worksheet (using .Add), Save it using the default filename and path and use the file system to move it to the filename desired.

Summary of the code:

Code: [Select]
objExcelWorkBook = objExcelApplication.Workbooks.Add();
objExcelWorkBook.Save( true );
strExcelWorkBookFullName = objExcelWorkBook.FullName;
objExcelFile = fileSystemObject.GetFile( strExcelWorkBookFullName );
objExcelFile.Move( strExcelFileName );

Please beware of the order of the statements.
And I use Save(true) to prevent the system to ask for confirmation to save.

General Board / Re: Deleting a package
« on: June 21, 2024, 03:31:09 pm »
It looks like this may be too late or might not be appropriate at all, yet I would like to make the remark. Sorry for that.

In situations like this, I try to add these kind of large chunks to a copy of the repository to do some testing first.
It is especially easy when working with file based repositories.
That way the original file is still available for normal operations.

Hai Geert,
Thanks for looking and sharing your code.
It may not be directly translatable but it did give me a hint to a workaround.
As I see, when the excel file does not exist, you are using the filesystem object to create a new file and open that as excel file.
Think this might be worth trying.

For a project, I'm trying to export some information to an Excel file using a JavaScript.
Most of the code now seems to work.
Except for creating a new Excel file on the location I want it.
Export works fine when I open an existing file.
Saving a newly created Excel file also works, it only refuses to write it to the strExcelFileName I specified using GetFileNameDialog().
When I close the newly generated Excel workbook, it saves it as "Map1.xlsx" in the default folder used by the Excel application.

The code below shows what I have used for testing (after cleaning up a bit).
Hope to get some pointers on how to fix this.

Code: [Select]
let objExcelWorkBook = null;
let objExcelApplication = null;

// Start the Excel Application as COMObject
objExcelApplication = new COMObject( "Excel.Application", true );

// Get the strExcelFileName to get the information from
projectInterface = Repository.GetProjectInterface();
strExcelFileName = projectInterface.GetFileNameDialog( strExcelFileName, FilterString, Filterindex, Flags, InitialDirectory, OpenorSave );

// Get objExcelWorkBook from the strExcelFileName provided
objExcelWorkBook = objExcelApplication.Workbooks.Open( strExcelFileName );
if ( objExcelWorkBook != null ) {
// objExcelWorkBook FOUND
Session.Output("EXCELWOpenWorkbook found Workbook with strExcelFileName = " + strExcelFileName + " !" );
} else {

// If the objExcelWorkBook file does not exist, then create one
objExcelWorkBook = objExcelApplication.Workbooks.Add();
if ( objExcelWorkBook != null ) {
// If the file added ok, then save it with new name
objExcelWorkBook.SaveAs( strExcelFileName );
} else {
LOGError( "EXCELWOpenWorkbook could NOT open nor add strExcelFileName " + strExcelFileName + "!" );

// Close and save the previously opened or created objExcelWorkBook


General Board / Re: Can you export relationships in CSV?
« on: April 04, 2024, 06:49:13 am »
It might be true that CSV is only for first time use.
The EA Excel Im-Exporter from Geert however uses the GUID to identify elements.

General Board / Re: Can you export relationships in CSV?
« on: March 29, 2024, 09:19:20 pm »
I've extended the EA Excel Im-Exporter from Geert ( to handle connectors.
Needs some more testing.
Send me a DM with your email and I'll send it to you.

General Board / Re: Searching in EA
« on: January 22, 2024, 06:00:00 pm »
For deduplication, I use the open source IDEA add-on (see

Pages: [1] 2 3 4