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

Pages: [1]
1
General Board / Re: May I re-use images in my application?
« on: August 14, 2007, 04:42:29 am »
Just for your information:
I asked the sales support and in my case they allowed me to use the icons :)

2
General Board / Re: May I re-use images in my application?
« on: August 09, 2007, 07:35:48 am »
correct

3
General Board / May I re-use images in my application?
« on: August 09, 2007, 04:29:31 am »
In my master thesis, I wrote an adapter to access models from EA via EMF. To quickly recognize all types, I want to re-use the icons from the EA as shown in the image below. The adapter will most probably be used in a company with which I developed the adapter. May I use these icons or do I have to replace them with some generic icons?




4
Automation Interface, Add-Ins and Tools / Re: Object Model : java help
« on: March 06, 2008, 09:29:02 pm »
Hi Mark,

you need to call Update() on the element you changed. Try this (untested):

Code: [Select]
...
Element e = repos.GetElementByGuid(PIMid);
e.SetName("newName");
e.Update();
...

5
Hi David,

thanks for the warning. IMO you should always set both ends of a connector explicitly if you create one. This is what I do, only later. And I needed to call Update() in previous versions because the ConnectorEnd objects were only available after that call. As I have seen, this also changed in version 7 - they are available right away now  :)


6
Yes, thank you!
Setting both connector ends before calling Update() did the trick.  :)

But I have to implement both ways to make my tool compatible to all versions  ;)

7
Hi!

I use the following code to create a new connector using Java and the automation interface. This works in Versions 6 and 6.5 but failes in version 7. Any idea? Did they change something in the new version?

Code: [Select]
...
Collection collection = eaElement.GetConnectors();
Connector newEaConnector = (Connector)collection.AddNew("conn", "Association");
newEaConnector.SetName("conn");
newEaConnector.SetNotes("generated");
newEaConnector.Update(); // <--- here an Exception occurs in v7
collection.Refresh();
...

Bye!
Patrick

8
The scenario is a little bit different than I explained, sorry for that.

The GUID of a parameter changes sometimes after modifying the parameter. Finally, I figured out when it does change and when it does not:

1. I open the dialog to edit a method which - in my case - contains one parameter. Next to the 'Parameters' field I use the 'Edit' button to edit the parameter. In the Parameters-Dialog I select the parameter, change the name, save it and close the dialog. Then I save the method.
=> This does not change the GUID of the parameter.

2. Again, I open the dialog to edit a method which contains one parameter. In the 'Parameters' field, the parameter is defined as 'myParameter: boolean'. This time, I use this field to change the name to 'myChangedParameter: boolean'.
=> This does change the GUID of the parameter!

Tested with version 6.1 build 791.
In version 6.5 build 804 it seems to be fixed.

Patrick

9
I use the Java API to access a model via the automation interface. I use the guids of all elements to keep track of them if anything changes within the model.
But each time I re-open the model, each parameters gets a new guid! All other elements (packages, elements, attributes, etc) keep their guids.

Bug or feature? ::)

cu
Patrick

10
At the moment, I am writing an adapter to access an EA-model with EMF. It does not support all elements (e.g. diagrams are not included yet), but it works fine with Packages, Elements, Attributes, Methods, Parameter, TaggedValues and Connectors.
Both directions (read and write) are possible.

It is not yet possible to save the model as an XMI-file in EMF but all changes are directly applied to the EA model.

I use the Java API shipped with EA v6.5.

If someone is interested in this adapter and if I find some time, I can create some kind of release for it...

11
Automation Interface, Add-Ins and Tools / Re: How to change GUID?
« on: June 18, 2007, 03:20:45 am »
Let me explain the whole setting..

Lets assume we have a model M and we want to branch it. To do so, we copy the eap-file, lets call this model M'. Both versions are modified independently of each other.

Now, we want to copy an element from M' to M. So we create such a new element in M and all relevant attributes can be set - except for the GUID because it is readonly.

The Java API only provides a getter for the GUID field. But the User Guide says it should be possible to set it - but I don't know how...
Perhaps via SQL if the Java API is not capable of changing it?!

Patrick

12
Automation Interface, Add-Ins and Tools / Re: How to change GUID?
« on: June 18, 2007, 02:19:41 am »
Quote
...
What you need to do is, immediately after calling AddNew, assign your own GUID. EA will notice this when you call Update, and will accept the GUID you've assigned.
...


Sounds feasible, but I don't know how to assign my own GUID.

I'm using the Java API shipped with EA v6.5 but it does not provide a setter for the GUID. So how can I assign the GUID?

13
Automation Interface, Add-Ins and Tools / How to change GUID?
« on: June 17, 2007, 11:41:37 pm »
I need to change the GUID of a new Element via the automation interface. The User Guide says:
Quote
Read only.  A globally unique ID for this Element - unique across all model files. If you need to set this value manually, you should only do so when the element is first created - and make sure you format the GUID exactly as EA expects.

At least, it seems to be possible :-) - but how can I do this?

Patrick


14
Thanks for the quick reply.
Unfortunately, I cannot get the BatchAppend property to work. I tried to set it to true, then I created 100 packages each containing 100 classes again. Afterwards, I set batchAppend to false. But there is no big difference in time???

15
Hi out there,

I'm using the Java API to connect to the Enterprise Architect's COM automation interface using the files shipped with EA v6.5. Technically, that works fine. :D

But accessing the EA is quite slow. If I try to read only 3 packages, 15 classes and some tagged values, it takes almost half a minute. Actually, I want to read a model with 1000+ classes which takes about 15 minutes :o
Is there any way speedup the access?

It seems even worse if I create new elements. In a small test I created 100 packages each containing 100 classes. This took almost 10min..  :(

My goal is to read the entire model (1000+ classes) in java, modify it and write it back into EA. Unfortunately, after 8h an out of memory error occured in EA -> I checked the memomry usage and EA was using 1.5 GB !! :o

The readme of the Java API says: "Native COM classes and memory allocated for these is not seen by the Java garbage collector, so you should explicitly invoke a garbage collection from time to time when working with many objects using the Java API."
This is what I did, but obviously it doesn't affect the EA?!

Any help appreciated!

Patrick

Pages: [1]