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 - Geert Bellekens

Pages: 1 ... 476 477 [478] 479 480 ... 566
7156
Hi Stephane,

I've never seen anyone succeed in writing an add-in for EA using Java.
In theory it should be possible I guess, but I'm not sure if its worth the hassle.

Besides, if you know Java, then C# will be a breeze.

Geert

7157
Automation Interface, Add-Ins and Tools / Re: automate baselines
« on: March 26, 2013, 10:50:28 pm »
use the search button on the top left.
There have been a few threads recently about exactly that.

Geert

7158
Quote
The documentation does not tell anything along those lines. If EA crashes with ReloadDiagram it's simply a bug (to be reported).

q.
No doubt about that, should definitely be reported.

Geert

7159
Maybe EA doesn't like it when you reload a diagram in a EA_OnPostNewDiagramObject event?

A workaround could be to reload it in another event (EA_OnContextItemChanged?)

Geert


7160
So what happens if you leave the line out?
Do you have to close and re-open the diagram before your changes become visible?

Geert

7161
I would not do all of these updates:
Code: [Select]
tenDiagram.Update();
nowyElement.Update();
obiektDiagramu.Update();
Repository.SaveDiagram(tenDiagram.DiagramID);
and after the loop I would do a
Code: [Select]
ReloadDiagram (tenDiagram.DiagramID)instead of
Code: [Select]
Repository.RefreshOpenDiagrams(true);
Geert

7162
Two suggestions
- Post your code here so we might be able to spot the error
- Report a bug to Sparx. No matter what you do in your code, EA should not crash.

Geert

7163
Quote
Geert, you've got me worried now  :o

for all the things I create via thee Add-in I only 'need' to lock the diagram explicitly. Not the elements, packages - they get locked automatically.
I lock the diagram via applyuserlock, and everything works 100%

However - I also 'need' to release the lock (only on the diagram) because the user can not release it ??

So in fact 2 questions :
- why do I need to lock the diagram and nothing else
- why can't the user unlock the diagram (that has been locked 'in his name' by the add-in)


gr
We call that EAUI :o
So seriously, I do locking of elements and diagrams all the time in my add-ins and I've never experienced any of that kind of behavior.

But i've also never created new things in my add-ins before either.
Something you might want to try:
- Create diagram
- Save diagram
- Get diagram object again using Repository.GetDiagramBy...
- Lock Diagram

And then see whether or not the user can now unlock the diagram as normal.

Geert

PS. And of course report the strange behavior as bugs to Sparx.

7164
Danny,

I'm guessing the locking code in your add-in didn't work.
The fact that you can still rename things in your add-in doesn't mean anything. The API doesn't care for locking.

So I would focus on why the locking didn't work. Did you lock it before Update() -ing it?
Did you check the result of ApplyUserLock?

Geert

7165
You can write a small program to
- Open the (DBMS) repository
- Transfer to .eap file using the ProjectTransfer method as suggested by qwerty
- Close the (DBMS) repository

And then you can schedule that program to run every night.

Should be about 10 to 50 lines of code.

Geert

7166
No, sorry, no idea other then to figure out the complicated definition of the filter.

Or send in a feature request and have a lot of patience :-/

Geert

7167
Quote
The help documents say "on a diagram" fot the mentioned methods.
Well, that's just stupid. ::)

Geert

7168
I think all EA_OnPreNew and EA_OnPostNew events should fire regardless of the location or method used to create the new thing.
So if it doesn't fire when pasting in the project browser I could consider that a bug.

Geert

7169
Without the auditing option only the user who created something is stored, not the user that modified something.

Geert

7170
Jon,

I never ever use getByName() because I don't trust it.
In most cases it is possible that there are multiple elements with the same name in the collection, and in that case I don't know which one it will return.

Also, iterating EA.Collections is always a performance killer. I avoid it wherever possible.
If you are looking for elements you can indeed use the GetElementsByQuery, otherwise you case use Repository.SQLQuery to fetch the id('s) of what you are after use use the Repository.Get<XXX>ByID() operations to get the actual objects.

If you look at the EA Navigator code there are a lot of examples like that.

Geert

Pages: 1 ... 476 477 [478] 479 480 ... 566