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

Pages: [1] 2
1
General Board / Re: Add custom fields to PCS(pro cloud server)
« on: November 17, 2020, 09:26:16 pm »
I think you'll need to be a bit more specific?

When I hear custom fields I tend to think tagged values. You can add your own properties to elements using tagged values, and the web models (Prolaborate, webEA) who use PCS will show all tagged values.
But this is not specific to the cloud server.
Is that what you are looking for?

Geert
Thanks for the Update.


Yes, I am using the oslc to interface with the pro cloud server.

https://www.sparxsystems.com/enterprise_architect_user_guide/15.2/model_repository/oslc_cfactory.html

I have a custom field (test_id) . Need to add properties to elements/package and get the field into the response.

2
General Board / Add custom fields to PCS(pro cloud server)
« on: November 17, 2020, 08:52:18 pm »
Hi All,


 I need to add custom fields into the PCS(pro cloud server)


Is it possible to add custom fields? pro cloud server Sparx

3
General Board / Re: OSLC TO INTERFACE WITH THE PRO CLOUD SERVER
« on: November 06, 2020, 11:43:52 pm »
Hi sarathipriyan,

Please note that this is not my personal forum, but a general Sparx EA user forum, so it's a bit weird if you start with "Hi Geert"

I personally haven't used the OSLC interface yet, but I know that on one of the EA user groups in London there was a presentation from someone who did. IIRC this person worked for HP.

Geert

sure.Thanks for the update.

4
General Board / OSLC TO INTERFACE WITH THE PRO CLOUD SERVER
« on: November 06, 2020, 10:17:03 pm »
Hi All,


I am trying to use the oslc to interface with the pro cloud server. Is there some sample code that demonstrate simple CRUD operation?


https://www.sparxsystems.com/enterprise_architect_user_guide/15.2/model_repository/oslc_cfactory.html




5
Marshal.GetActiveObject("EA.App") gets you the running instance of EA, with or without model loaded.

If you want to load another model, use Repository.OpenFile or Repository.OpenFile2

Geert

Thank you for your suggestions Geert, now I'm able to create and modify packages and elements. I can see the package and elements in EA dashboard. Is there a quick way to visualize that relationship as model diagram in EA?

I  have tried to use package diagram to view the elements but it's not working.

6
I don't see the code you are using to start EA, nor the code you are using to open a model.

But more importantly, you are only dumping elements, not packages.
Usually there are no elements directly under the root packages, only packages.

Geert



Yes you're right in that code first we are opening the package and than we print the elements inside the package we wrote.

About opening the model, Sorry I thought object obj = Marshal.GetActiveObject("EA.App") would open the model. Can you suggest which call we need to use to open a model.

7
Hi Geert,

here's a copy of the code I'm using to connect with the EA repo externally.


   
Quote
static class Program
    {
        /// <summary>
        /// The main entry point for the application.
        /// </summary>
        private static global::EA.Repository _wrappedModel;

        [STAThread]
        static void Main()
        {

            Model();
            Console.WriteLine("Hooked upto repository");
            DumpModel();     
        }

        static public  void DumpModel()
        {
            for(short i=0; i < _wrappedModel.Models.Count; i ++)
            {
                DumpPackage("", (EA.Package)_wrappedModel.Models.GetAt(i));
            }
        }

        static public  void DumpPackage(string s, EA.Package package)
        {
            Console.WriteLine("Package Name = " + package.Name);
            DumpElements(s, package);
        }

        static public void DumpElements(string s, EA.Package package)
        {
           
            for (short j = 0 ; j  < package.Elements.Count; j ++)
            {
                EA.Element element = (EA.Element)package.Elements.GetAt(j);
                Console.WriteLine(":: " + element.Name);
            }
        }

        static public void Model()
        {
            object obj = Marshal.GetActiveObject("EA.App");
            global::EA.App eaApp = obj as global::EA.App;
            initialize(eaApp.Repository);
        }

        static public void initialize(global::EA.Repository eaRepository)
        {
            _wrappedModel = eaRepository;
        }


    }
}

I have also created a project, Requirement, package, and elements from EA console.
but I'm not able to get the elements externally. The count is zero(package.Elements.Count;)

how do I get the elements from EA?

Enterprise Architect v15.2.1554(Trial Edition Free 30 day unlimited) and I'm using VS2019 community.

8
This is the code I use to connect to the running instance on my model wrapper class https://github.com/GeertBellekens/Enterprise-Architect-Add-in-Framework/blob/master/EAAddinFramework/EAWrappers/Model.cs


Code: [Select]
        public Model()
        {
            object obj = Marshal.GetActiveObject("EA.App");
            global::EA.App eaApp = obj as global::EA.App;
            this.initialize(eaApp.Repository);
        }

this code (vbscript) creates a  new EA instance
Code: [Select]
dim repository
set repository = CreateObject("EA.Repository")

Geert



Thanks for the update. I will check and update you

9
Hi Geert and Uffe,

Using C# code we’re trying to access EA Project from outside the EA Process with something like GetActiveObject("EA.App") object. Is there any code sample (c#) that I use? We have a Enterprise Architect v15.2.1554(Trial Edition Free 30 day unlimited) and I'm using VS2019 community.


can you please share the sample c# code for access (create and get) EA Project from outside the EA .






10
General Board / Re: Error (Cannot register assembly ... access denied )
« on: September 30, 2020, 02:32:25 am »
Hello,


We need to initiate the call to EA from our application. Is there sample code that we can use ? Cheers

EA's API documentation is mostly written with the assumption that you're building either an in-EA script ("Object Model") or an Add-In ("Add-In Model"), both of which execute within the context of an EA process.

If you need to access an EA project from outside of an EA process, you need to start with an EA.App object. This in turn contains an EA.Repository.
Depending on the situation you can either create a new App object, or retrieve one from Windows' list of running processes if you want to connect to an already running instance.

There is a VBScript code sample on the App Object documentation page.
Note, however, that if you create a new App object, the first thing you have to do is either create or open a project using Repository.CreateModel(), .OpenFile() or .OpenFile2(). Until you do, you won't be connected to a project and most of the API won't do anything.

HTH,


/Uffe



Thanks for the update Uffe.i will take a look and update you

11
General Board / Re: Error (Cannot register assembly ... access denied )
« on: September 24, 2020, 01:12:10 am »
Thanks again Geert,


We need to initiate the call to EA from our application. Is there sample code that we can use ? Cheers

12
General Board / Re: Error (Cannot register assembly ... access denied )
« on: September 23, 2020, 12:01:46 am »
Thanks for the update .

13
General Board / Re: Error (Cannot register assembly ... access denied )
« on: September 22, 2020, 03:40:12 am »
Run VS as administrator, and make sure you close EA before building

Geert



Thanks for your suggestion Geert, that worked. Now I'm able to build.


I'm trying to get object/model from EA. while run the Sln file (EAMappingApp).
I am facing below mentioned issues.


An unhandled exception has occured .

Quote
error Message :

An unhandled exception has occured.
Error Message: The remote procedure call failed. (Exception from
HRESULT: 0x800706BE)
Stacktrace:  at EA.RespositoryClass.InvokeConstructPicker(Object
ConsturctType)
  at
TSF.UmlToolingFramework.Wrappers.EA.Model.getUserSelectedElement
(List`1 allowedTypes, List`1 allowedStereotypes, String
defaultSelectionGUID) in
C:\Users\Admin\source\repos\Test1\working EA
build\Enterprise-Architect-Add-in-Framework\EAAddinFramework\EA
Wrappers\Model.cs:line 1676
  at
TSF.UmlToolingFramework.Wrappers.EA.Model.getUserSelectedElement
(List`1 allowedTypes) in
C:\Users\Admin\source\repos\Test1\working EA
build\Enterprise-Architect-Add-in-Framework\EAAddinFramework\EA
Wrappers\Model.cs:line 1635
  at EAMapping.EAMappingAddin.selectAndLoadNewMappingSource()
in C:\Users\Admin\source\repos\Test1\working EA
build\Enterprise-Architect-Toolpack\EAMapping\EAMappingAddin.cs:li
ne 369
  at EAMappingApp.Progra.Main() in
C:\Users\Admin\source\repos\Test1\working EA
build\Enterprise-Architect-Toolpack\EAMappingApp\Program.cs:line
28
I tried below solution file to set as start up

EAAddinTester
EAMappingApp
EAValidatorApp
ERXImporter
LicensekeyGenerator
MagicdrawMigrator


which one is better to get object/model from EA?

Any suggestion is greatly appreciated.

14
General Board / Re: Error (Cannot register assembly ... access denied )
« on: September 21, 2020, 09:37:06 pm »
Thanks for the update.i will try that

15
General Board / Error (Cannot register assembly ... access denied )
« on: September 21, 2020, 08:53:25 pm »
Hi Geert,



I used VS2019 community and Enterprise Architect v15.2.1554(Trial Edition
Free 30 day unlimited)



I'm trying to build the toolpack using the 30 day trial version. This is for a POC work to evaluate EA for our application.
We want to integrate our Requirement system with EA. Thought your toolpack(https://github.com/GeertBellekens/Enterprise-Architect-Toolpack) is the quickest path for our integration. I've run into the following issue.




Quote
Severity   Code   Description   Project   File   Line   Suppression State
Error      Cannot register assembly "C:\Users\Admin\source\repos\TEST000000000001\working EA build\Enterprise-Architect-Toolpack\EADoorsNGConnector\bin\Debug\EADoorsNGConnector.dll" - access denied. Please make sure you're running the application as administrator. Access to the registry key 'HKEY_CLASSES_ROOT\EADoorsNGConnector.AboutWindow' is denied.   EADoorsNGConnector         


Severity   Code   Description   Project   File   Line   Suppression State
Error      Cannot register assembly "C:\Users\Admin\source\repos\TEST000000000001\working EA build\UML-Tooling-Framework\UMLToolingFramework\bin\Debug\UMLToolingFramework.dll" - access denied. Please make sure you're running the application as administrator. Access to the registry key 'HKEY_CLASSES_ROOT\Record' is denied.   UMLToolingFramework         


Severity   Code   Description   Project   File   Line   Suppression State
Error      Cannot register assembly "C:\Users\Admin\source\repos\TEST000000000001\working EA build\Enterprise-Architect-Add-in-Framework\EAAddinFramework\bin\Debug\EAAddinFramework.dll" - access denied. Please make sure you're running the application as administrator. Access to the registry key 'HKEY_CLASSES_ROOT\Record' is denied.   EAAddinFramework         


Severity   Code   Description   Project   File   Line   Suppression State
Error      Cannot register assembly "C:\Users\Admin\source\repos\TEST000000000001\working EA build\Enterprise-Architect-Toolpack\EAJSON\bin\Debug\EAJSON.dll" - access denied. Please make sure you're running the application as administrator. Access to the registry key 'HKEY_CLASSES_ROOT\EAJSON.AboutWindow' is denied.   EAJSON         


Severity   Code   Description   Project   File   Line   Suppression State
Error      Cannot register assembly "C:\Users\Admin\source\repos\TEST000000000001\working EA build\Enterprise-Architect-Toolpack\ECDMMessageComposer\bin\Debug\ECDMMessageComposer.dll" - access denied. Please make sure you're running the application as administrator. Access to the registry key 'HKEY_CLASSES_ROOT\ECDMMessageComposer.AboutWindow' is denied.   ECDMMessageComposer
         



I tried various suggestions like removing the com registration etc but no luck. Any suggestion is greatly appreciated.




Pages: [1] 2