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 - Slávek Rydval

Pages: [1]

I've got ASP.NET Core 2.1 app that is accessing EA repository. The code below works fine until I want to create another instance. When I use the code again, the current instance of EA is used, so I lose the connection to the first repository. Is there any witted solution to this problem?

Code: [Select]
EA.App eaApp = (EA.App)Activator.CreateInstance(Type.GetTypeFromProgID("EA.App", true));
EA.Element test = eaApp.Repository.GetElementByGuid(_testGUID);


I've got two add-ins that react on these events: EA_AddinLicenseValidate, EA_AddinLicenseGetDescription and EA_GetSharedAddinName. When I'm using just one of them, everything works fine. But when I enter the license key for the second add-in, it rewrites the first one's license key and vice versa. I can't see the reason why. It of course causes the situation when I cannot use both add-ins at the same time. Where could be a problem?

You can find a testing solution for VS 2017 at GitHub:

Sparx EA 14 build 1420.

Bugs and Issues / EA_OnContextItemDoubleClicked
« on: May 04, 2018, 07:02:22 am »
I just reported this bug for the very last build of EA 14:

When an addin reacts on EA_OnContextItemDoubleClicked and returns true, a context menu appears.

1. just use some addin reaction on EA_OnContextItemDoubleClicked.
2. double click on an item in Project Browser and show e.g. a custom dialog.
3. Close the dialog.
4. return true from EA_OnContextItemDoubleClicked.
5. a context menu appears.

This content menu has the same items as the sub menu Properties in context menu of the item in project browser.

Is anyone experiencing this as well?

Automation Interface, Add-Ins and Tools / How to use shared keys in add-in?
« on: February 22, 2018, 12:19:20 am »
I developed an add-in that uses EA licence abilities. Private keys work properly but shared have problems: I am always getting this error messages when trying to add a key via Add Registration Key in EA: The last key of this type has just been taken by someone else. That means (besides other) that EA_AddinLicenseValidate is not called.

When I check the licence in Sparx Systems Key Store, licence is not taken (assigned) to anyone so from user perspective is free.

Where should I look for a solution?

I have a simple directed association between two classes. Then I change the c.ClientEnd.Navigable to "Non-Navigable" value within an addin method. As a side effect, EA changes connector's direction to the opposite one. Why?

The code in C#:

EA.Connector c = Repository.GetCurrentDiagram().SelectedConnector;
//now, the c.ClientEnd.Navigable == "Unspecified", c.SupplierEnd.Navigable == "Navigable" and c.Direction == "Source -> Destination"

c.ClientEnd.Navigable = "Non-Navigable";
//now, the c.ClientEnd.Navigable == "Non-Navigable", c.SupplierEnd.Navigable == "Navigable" and c.Direction == "Source -> Destination"

//!!!now the value of c.Direction is "Destination->Source"!!!


You get more side effects when you change OwnedByClassifier:

c.ClientEnd.OwnedByClassifier = true;
//direction and navigability is chagned

Is there any description how to proper change ConnectorEnds properties without these side effects?

Automation Interface, Add-Ins and Tools / MDG_GetProperty and icon
« on: November 01, 2016, 08:18:25 am »

are there any rules related to the icon in dll with the plugin? I've got MDG plugin written in C# (.NET 4.5.2 or higher) and an icon as a resource. When a question to the icon comes I return:

public object MDG_GetProperty(EA.Repository Repository, string PackageGuid, string PropertyName)
    switch (PropertyName)
        case "IconID": return System.Reflection.Assembly.GetExecutingAssembly().Location + "#treeview";
        case "Language": return null;
        case "HiddenMenus": return EA.MDGMenus.mgBuildProject & EA.MDGMenus.mgMerge & EA.MDGMenus.mgRun;
        default: return null;

Although the package is connected, no icon is shown. Beside the icon I tried also a bitmap without any positive effect. Can you give me any hint? Cheers.

General Board / Relationship Matrix and applying of Model Search
« on: May 11, 2015, 12:45:15 am »
Dear folks,

I have a custom search which returns two rows as a result. When I want to use it in relationship matrix, it doesn't work even one of the columns is CLASSGUID as is stated in documentation:

select ea_guid as CLASSGUID, Object_Type AS CLASSTYPE, *
      from t_object
            where object_id in (2130, 2205)

What else must be fulfilled to obtain the result set in RM?

Thanks in advance.

EA 12 (build 1213), EAP repository, no addins.

Hi all,

using Repository.GetContextItemType() function when a root package (model) is selected and has a focus in the Project Browser returns otNone instead of otModel (or otPackage at least). Is it an EA mistake or my misunderstanding of mentioned function? If the latter is right, what is the proper way?

Cheers for your answers.


Win 8.1, EA 11 build 1112 Corporade Edition, MS Visual Studio Express 2013 SP 3 for Windows Desktop, C#

Pages: [1]