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

Pages: [1] 2 3 4
1
General Board / Provide reason to connect to EA application using DLL
« on: October 14, 2024, 06:54:12 pm »
Hello,

I am using Interop.dll to connect to EA application using API. I want to provide reason for opening the connection with EA application similar to hibernate where we can provide reason of opening a new connection.

Is there any way in EA api where i can provide reason for opening the connection ?

Thanks

2
General Board / Get history of API calls made to EA
« on: September 24, 2024, 04:12:48 pm »
Hello,

I have an application which communicates with EA using API to read/create/update entity in EA.

I want to know the history of API request which has been made in the API, along with their execution time from EA.

Is there any way to find out the following:
1. History of API request which has been made to EA
2. Execution time taken to process the given request

Thanks

3
General Board / EA behavior for multi-threaded environment
« on: September 23, 2024, 11:10:33 pm »
Hello,

I have created a multi-threaded application that communicates with EA system. Set-up for my application is as follows:

There are 5 threads: T1 to T5 which parallelly make request to EA system using API.

Out of all the above 5 threads, suppose request of third thread T3 is wrong request which results into pop-up to be displayed from EA application.
Because of pop-up, my EA application stops its processing for other threads request and all the remaining thread gets halted until the pop-up is not closed.

I want to perform following operation:
1. Fetch the text from pop-up and close the pop-up from the program.(Done)
2. Pass the pop-up to the thread which caused the pop-up. In my case third thread (T3)

I want to know about the following:
1. Is my understanding of EA stops processing further request until pop-up is not closed correct? I want the actual behavior of EA in multi-threaded environment.
2. Is there any way to identify which thread cause the pop-up to occur so that I can get to know which thread caused the issue?

Thanks

4
General Board / Pop-Up: Operation is not allowed when object is closed
« on: September 20, 2024, 04:41:08 pm »
Hello,

I am having a version-controlled package in EA which is syncing from source to other project of EA.
Operations I am performing,

1. While writing any create/update, first take check out of the package
2. Perform create/update operation
3. Perform check in of the package.

While performing this I am getting pop-up of operation is not allowed when object is closed..
Also, there are many requests going on parallelly on the same project at the same time.

Why do I get this type of error in version-controlled package, and how to solve this error or how to avoid this error?

Thanks

5
General Board / API calls limit error from EA
« on: September 20, 2024, 03:18:23 pm »
Hello,

I have an integration in which I am integrating multiple projects of EA from to other projects of EA.

Projects used are: .qea(file based), and .eap(mysql database)

There are multiple read and write operations being performed on the projects at the same time parallelly for each entity that is present in the project. Each project has around 3 root nodes and 50 packages in each root node. And each package around 20-30 elements/diagrams in it.

I am getting pop-up of database lock on too many API calls on same project for the (.qea) file.

I want to understand why am i getting this pop-up for (.qea) file. Does EA internally apply some locking mechanism??

Thanks

6
Hello,

I want to add an inline image in element, package, diagram entities in EA. Is there any way in which we can add an inline image in the Notes field, or by creating any custom field (tagged value) in the application for a project and add inline image??


Thanks

7
General Board / List of Error codes
« on: September 16, 2024, 02:48:18 pm »
Hello,

Can someone please share with me error codes list and there meaning or any documentation regarding error codes which we receive from EA application while using API's to communicate with EA application.

Thanks

8
Hello,

I am using enterprise architect application as source and target. In the source I have created packages which I want to sync in the target repository.
I am using API to automate this task. I am C# to automate this task.
I am using OpenFile2 command to open the EA repository. In this scenario when I give wrong project path and do not release the GDI objects, after some times I get an pop-up from EA application saying cannot create empty document.
Whenever this pop-up comes up, my automation gets stuck in the middle and I need to manually go to the VM and close the pop-up.

I would like to know more about following two questions:

1: What are the pop-up which EA application gives. And in what case/scenarios does EA give pop-up when interacting EA through API's. Link to the documentation or any blog released by EA will be more helpful.

2: Is there any way in which we can avoid opening of pop-up and get the error message in API response, or some other way to silently handle pop-ups


9
General Board / Loop node
« on: March 15, 2024, 11:27:34 pm »
Hi,

I want to reproduce this diagram https://sparxsystems.com/enterprise_architect_user_guide/16.0/modeling_languages/loop_and_conditional_nodes2.html

I have two questions:

a) How can I insert and display the condition (i.e. i=0) under each action?
b) I have inserted an action into [Test] section but I cannot see it in the Properties > Nodes panel.

Thanks for help

10
facing error "Failed to create empty document" while opening EA eapx project. What should i do now to resolve it ?

11
Bugs and Issues / Date format not updated for QEA/ QEAX repositories
« on: November 14, 2023, 11:02:35 pm »
Hi,

When I change the regional formatting of windows in Time and date settings, the modified and created date for diagrams and objects for QEA and QEAX repositories does not change according to the local time format. However, for EADB and EAPX this change is reflected immediately.

Do we need to separately handle such time format changes for QEA and QEAX in EA?

12
General Board / Change the date format of modified date which is presisted
« on: November 14, 2023, 02:55:49 pm »
Hello,

Currently, the modified date is presisted in "yyyy-mm-dd" format in the database. I want to change the date format to "yyyy/mm/dd" format. My short hand date format is in "mm/dd/yyyy" format.

How can I change the format that is stored for modified date ?

Thanks

13
I am using Enterprise architect API(using C#) to create an "Package" using API and then perform some updates on the same package created. The project I have created is an (.qea) file based project and using the same created project.

While updating the package using package.Update() method I get pop-up of database is locked from the enterprise architect application and the application is freezed and does not respond to any further API calls. Below is the error I get from the enterprise architect application:

Error : Sparx Systems Database API [0x00001086]

SQL API Update FAILED with error: database is locked
Context:
Update t_package set  PackageFlags  = :bv_packageflags,  Namespace  = :bv_namespace,  CodePath  = :bv_codepath,  UMLVersion  = :bv_umlversion,  PkgOwner  = :bv_pkgowner,  Version  = :bv_version,  LastSaveDate  = :bv_lastsavedate,  LastLoadDate  = :bv_lastloaddate,  XMLPath  = :bv_xmlpath,  ea_guid  = :bv_ea_guid,  Notes  = :bv_notes,  ModifiedDate  = :bv_modifieddate,  CreatedDate  = :bv_createddate,  Name  = :bv_name where Package_ID = 112
   at EA.IDualPackage.Update()


Environment: Here, I am using the same project to create elements, diagrams and packages on the same project and perform operations of multiple create and multiple updates concurrently.

I want to know the reason for why this pop-up comes from the enterprise-application for file based projects.

Thanks

14
I am using enterprise architect version 15 and I have created one file based project with .eapx file Extension. I am trying to create and update new package via API(using C# language) in enterprise architect with following hierarchy: Root Model/Package/New Package and while Updating the package I am getting following pop of underlying model has been changed, which freezes my enterprise architect to respond to any further API calls

Following is the order of execution(Here every step is an separate function which passes the newPackage that is created):

1. First create a package with name 'Demo'

Code: [Select]
Package newPackage = package.Packages.AddNew(EAConstants.OH_CREATE_TEMPLATE, "Package");
newPackage.Update();

2. Set the system field values.
Code: [Select]
Package package = (Package)newPackage;
package.Element.Status = "Approved"
package.Element.Stereotype = <Some Stereotype Value>;
package.Element.Update();
package.Update();

3. Set tagged values
Code: [Select]
Package pc = (Package)newPackage;
Element element = pc.Element;
set tag values for element
element.TaggedValues.Refresh();
element.Update();

4. Update name of the new package
Code: [Select]
Package changePackage = (Package)newPackage
changePackage.Name = "NewName"
changePackage.Update();

5. Refresh package
Code: [Select]
Package package = (Package)newPackage
newPackage.Element.Refresh();
newPackage.Update();

Tried things:
  • Tried to refresh all the models after each update step.
  • Tried to refresh all the model before each update step.

Expectations: Avoid the pop-up displaying warning message, because it freezes my enterprise application for any further API calls(More suitable approach: avoid using suppress dialog box method for package).

15
General Board / How to get stereotypes fully qualified name?
« on: October 19, 2023, 05:47:14 pm »
I have created Element with some stereotypes of different profile.
I am using interop.ea.dll to work with EA soap apis.
 
Here element's `FQStereotype` attribute only returns value for first stereotype.
and element's `StereotypeEX` attribute only returns list of stereotypes normal names not fully qualified stereotype names.
 
So, is there any mechanism to get all the stereotypes of element with its fully qualified name?
 
Code we used to get stereotypes values:
 

using System;
using System.Runtime.InteropServices;
using EA;
 
namespace EAInteropExample
{
    class Program
    {
        static void Main(string[] args)
        {
         String entityGuid = ##;

            // Connect to Enterprise Architect
            Repository repository = ConnectRepo();
 
            // Ensure that the repository is open
            if (repository.IsProjectOpen)
            {
            Element element = repository.GetElementByGuid(entityGuid)
            if (element != null){
               Console.WriteLine(element.FQStereotype);
               Console.WriteLine(element.StereotypeEx);
            }
 
                // Close the repository
                Marshal.ReleaseComObject(repository);
            }
            else
            {
                Console.WriteLine("Enterprise Architect project is not open.");
            }
        }
    }
}

Pages: [1] 2 3 4