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

Pages: [1] 2 3
1
Hello, I will get crazy (maybe it is already to late). Because I did not get the Eclipse / Java example to run, I tried Geert's Excel example. But the script says always that I may have forgotten to start EA or something else is wrong.

What I did is:
- "Install" Enterprise Architect Object Model or EA.tlb respectively via Excel References.
- "Install" Microsoft Word Object Library
- run "ea.exe /register".
- start EA.

Does anybody know if it is necessary to install EA.tlb via regtlibv12.exe?

Any other suggestions? Are any admin-rights required (e.g. to \Windows\System32)?

Is the reason that I use "GetObject(, "EA.App")? What if I start two EA's? Which one will be accessed?

Many thanks in advance, V.

2
Hi, is there Mercurial support in the meantime? The only article I fould for this topic is from 2010 (http://sparxsystems.com/forums/smf/index.php?topic=29252.0). Many thanks in advance, V.

3
Hello, I am curious if anybody got the example of EA to work. I often read the same problems as I have, but no solution. I am not allowed to put the SSJavaCOM.dll into a system folder. That's why I am using System.load("C:/Program Files (x86)/Sparx Systems/EA/Java API/SSJavaCOM.dll") instead. I tried this in EA and Eclipse. In EA I got a java.lang.NullPointerException. In Eclipse the system throws "Exception in thread "main" java.lang.Exception: Failed to construct object. Error code: 0x80040154". I tried several alternatives (e.g. setting pathes in environment variables). But nothing works in both environments. I cannot image that the restriction with the directory is the reason. Help and ideas are very welcome. V.

4
Hi,
I want to access EA from Eclipse using java. I turned into 32 bit.

I am using following code:

package com.sparxea.explore;
import org.sparx.Repository;
public class Explore {
   public static void main(String[] args) {
      String db = "EntArchDB_PROD --- DBType=1;Connect=Provider=SQLOLEDB;Integrated Security=SSPI;Persist Security Info=False;Initial Catalog=EntArchDB;Data Source=ldbisprd1,4042;LazyLoad=1;";      
      // System.out.println("Start Connection!");
      System.loadLibrary("SSJavaCOM");
      Repository rep = new Repository();
      rep.OpenFile(db);
   }
}

I am not allowed to put the SSJavaCOM.dll into the system-folder. So I used an Environment variable: %ProgramFiles(x86)%\Sparx Systems\EA\Java API

I get following Exception from "new Repository()", because the dll cannot be found:

java.lang.Exception: Failed to construct object. Error code: 0x80040154
   at org.sparx.Repository.comConstructor(Native Method)
   at org.sparx.Repository.<init>(Repository.java:190)

Any ideas? Is the reason the environment variable? Is there an alternative?

Many thanks in advance, V.

5
Hello together,

I am looking for possibilities to access the Sparx API from "outside". I want to run "scripts" in Java, Visual Basic or something else (that works) and manipulate content in EA via the Sparx API. So to say I want to run a script which also could be excecuted inside EA. Most welcome would be Java inside Eclipse as container.

The database for our EA environment is MSSQL-server. I saw a lot of possiblities to access EA (e.g. Scripting Enterprise Architect, from there I used the subject-title). But these possibilities are EAP-based and sometimes I have the impression, that they are outdated (e.g. I did not find a complete example using Java API).

Are there any summaries available?

Many thanks in advance, V.



6
Hi,

I refer to http://sparxsystems.com/forums/smf/index.php?topic=5268.0.

I never used Visual Basic in my life. I want to access EA via VB. I do not want to install a tool. So I want to run it (with cscript) from a DOS-box.

The document mentioned above says that I have to use "Enterprise Architect Object Model" resp. EA.tlb. Can I link this library inside the script or as part of the cscript-command. Probably this is more a VB question. I hope that somebody can tell me the solution anyway.

Many thanks in advance, V.

7
Hi, because I am not allowed to use MS Script debugger (out of MS-support), I wanted to switch to Javascript. To test the environment I tried a simple script (see below), but EA says, that println is not defined. The script works fine in another environment.

function main() {
       println('Test');
}
main();

So my question is, what are the prerequisites of JS? Can it be disabled and how? Many thanks in advance, V.

8
Automation Interface, Add-Ins and Tools / Data Modeling
« on: May 15, 2017, 02:49:49 am »
Hi together,
It seams to me that Toolbox > Data Modeling has change since I used it the last time.
(1) If I want to add properties with F9, it opens a database-connection. Can I turn this off?
(2) If I want to add columns, the type has to be a VarChar. Is that a bug or a feature?
(3) The documentation says, that there is a diagram available for this notation "Click on Extended > Click on Data Modeling". I cannot find this. How can I assign this diagram type to my diagram?
(4) Normally I use Chen, but prefer Data Modeling in the meantime. Am I wrong using this notation for modelling databases?
Many thanks in advance, V.

9
Hi,

(1) Is there a posbility to relate an element (in my case a BPMN activity) and a method of a class?

Related to the question above but in fact a new topic is the following: I tried to drag and drop the method (a) of a class from the project browser onto a diagram. I am confused about the result:
(2) EA did not ask if it should add a link or a copy. It created a new element (b) in the project browser with the the same name but different shape and an additional element called "target" (3). And it added the new element (b) into the diagram. What does that mean?
(3) If I ask the created shape / element (b) for "insert related elements" the list is empty. So the element does not know that it is derived from the method (a) and that it should be related to it.
(4) If I change the name of the original method (a), the new element (b) adds the new name after the name of the original class and two double points, but keeps its own name.

Feedback is very welcome. Many thanks in advance, V.

10
Hi, I cannot imagine that this has not been asked before, but I cannot find a corresponding thread.
(1) EA builds a hierarchy in the Project Browser by default if I move an element into another. But it does no reflect this via any kind of relation. For exampe the "reference" is not shown "Insert Releated Elements".
(2) The same is happens for "Composite Diagram" resp. "Child Diagram".
Is there a way to find out the relations (without database-queries)? Many thanks in advance, V.

11
Hi, I have an element A and with a click I want to jump to diagram 1 oder diagram 2. The reason for this request is that I model a value chain. A process (element A) summarizes several variants (here digram 1 with process variant 1 and diagram 2 with process variant 2). Is there a way to get a selection box for an element with more than 1 choices? At the moment I am using hyperlinks to jump from element A to diagram 1 or 2. I also tried a Child Diagram and added the variants there (n processes in 1 diagram which I do not want). Both alternatives are not satisfactory. Any ideas? Many thanks in advance V.

12
Automation Interface, Add-Ins and Tools / Timer
« on: April 25, 2017, 03:07:03 am »
Hi,

Is there a possibility to start XMI-im- and exports with a timer? We have to ex- and import very big models and want to do this at night after the database backups.

Many thanks in advance, V.

13
Hi,

We need to use the Microsoft Script Debugger. The support says that this product is "depricated". That's why they are not allowed to install it. Is there an alternative available?

Many thanks in advance for your answers, Viking

14
Hi together,

We implemented a stereotype "ProcessStep" with an own shape script. The stereotype generalizes the stereotypes BPMN2.0::Activity and Archimate2::Archimate_BusinessProcess. Both have the same MetaClass Activity.

The script would work fine. Unfortunately it "inherits" the shapescript. We thought "overwriting" prevents "inheritage". Did we do something wrong or missed something? How can we avoid the inheritance of the script?

We did not use "drawparentshape" in the script.

We did the same for Pool and Archimate2::Application. This works fine. The reason seems to be that they have different metaclasses.

Many thanks in advance, V.

15
Hi together,

We created a MDG. A part of it is the new stereotype "Process Step" with an own shape script. Dependent on the diagram type it is used, the Shape Script shows a BPMN Activity or ArchiMate BusinessProcess. We have learned that we have to use Generalization and / or Extension. But we think we did not understand the concept behind it. The MDG does not work as expected.

Our questions are:
(1) Can a new stereotype (here "Process Step") use Extension to a (or several) meta class(es) and Generalization to a (or several) sterotype(s) in parallel?
(2) To which Stereotypes should we point Generalization of "Process Step" (currently we are using Archimate2::ArchiMate_ApplicationComponent and BPMN2.0::Pool)?
(3) Is multiple Generalization possible (in our exampe above "Process Step" points to 2 sterotypes (see (2))?
(4) To which MetaClass should we point the Extension of "Process Step" (we tried "Class")? Or do we only need Generalization because the sterotypes we used for Generalization (see (2)) should have been extended a MetaClass already).

Many thanks in advance, V.

Pages: [1] 2 3