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 - Ian Mitchell

Pages: [1] 2 3 ... 34
1
General Board / Audit information for US M-21-31
« on: March 14, 2024, 10:53:32 pm »
I've just been asked about the exporting of EA Audit information, to support some new US regulation "M-21-31".
It looks like a very far-reaching requirement, to export information about everything that every user edits and views in an EA model.
I have never been asked for anything like this before, but I expect that, if it's a new US regulation, then other parts of the Federal government might ask for it in future.
@Sparx USA: might be an opportinity here for you to create a useful offering?
Hopefully the lack of this function will not stop the US government from using EA.

2
Pure genius Johann.

I would like to award the 2024 'Sparx Sherlock Holmes Award for Best EA Detective' to Johan!!


Thanks to Geert for seeing the element.getTXNote(...) and  element.setTXNote(..) methods.
I'm not sure which release these appeared in, but they do everything I need.
Nearly everything: the value of the languae code which these methods needs can be found in usys_system in the TranslateSecondary setting.

But Johan is still a genius.

3
If anyone needs a test case, the data from EA was:

U1MDBBQAAAAIAH5gVVjVk/2cDgEAALICAAAHABEAc3RyLmRhdFVUDQAHk+bV
ZZPm1WWT5tVlfVJda8JAEJznQv/D4XOp+p4qRQUfiv8hNiG1TU7IJSL99c7s
lhbR60PuY2Zud7K7BZY4o0OLgBNq9Eg44IiIF0wwxzNm3APRASXRimtrfG2K
yLP4JRZ4xAMK6npTJupK3jxaIp/jgt0iGozcm9/IrUWOxDpib9S+44unynj3
JTcHrinDy99A7JafX0Vf4YOr+EQX3d0Mec1flv80nknIdVxHFljzPpD55v5p
dam5ynHLTy9UJeURFqlSzXQKdg6WWxF29pfqple2YpYn4sLUSzkcDS/5sjdU
/ZUnzYHeBGzwyv4HbH+i+nxIJz9SKPue32i416GxDHIpD8lcuYcO3vOGUQtM
M9OgOclxmqILUEsBAhcLFAAAAAgAfmBVWNWT/ZwOAQAAsgIAAAcACQAAAAAA
AAAAAACAAAAAAHN0ci5kYXRVVAUAB5Pm1WVQSwUGAAAAAAEAAQA+AAAARAEA
AAAA

which was extracted using a simple bit of SQL to read the BinContent column of t_document.
The text should decode to something like:

Dit zijn enkele aantekeningen in het Nederlands, de secundaire taal van EA. Het vertalen gebeurt nog steeds handmatig.
(Apologies to native Dutch speakers: this is aGoogle translation.)

4
I have tried to make this work, but when I try to open the ZipArchiveEntry for the str.dat file, I get an error: "A local file header is corrupt".
This may sugest that Sparx have done something else on top of the (ZIP + base64 encoding) which now seems to be normal for potentially large data fields like this.

The data I  am trying to extract is a simple test case:  the translation data for a single element, where I added the translation to the 'notes' translation tab via the UI.

Has anyone else had success in extracting this data?
@Sparx - are there any instructions anywhere which say how to acess this data? Maybe an API call?

5
Interest: I'm the author of this tool.

The eaSheets bit of eaTeamWorks can do this - import the element, and relationships of the element. See the eaTeamWorks website.

6
PCS General Board / Re: PCS performance
« on: November 10, 2023, 08:23:56 pm »
Thanks to everyone.
I'll try to get access direct to the DB, and see what difference that makes. I don't know how close PCS and the repository are, so I'll check that as well.

I had an expectation that this would be slower, just not this slow.
I think I may have to go to the 'SQL Only' solution, and optimise repository access a lot more, but I hate doing stuff like this. I makes the code more messy, and introduces loads of errors. But in this configuration, I guess it's the only solution.
There is scope here for a Sparx 'super API' which could do stuff like 'fetch me all the elements in the package'. I already have these kinds of calls for Model Expert, as I was expecting it to be very heavy on repository access, so it doesn't sufer from these issues as much.
But to use SQL everywhere and not the API is a big coding overhead.
Sigh.

7
PCS General Board / PCS performance
« on: November 09, 2023, 08:32:38 pm »
I'm using PCS to access a remote database for the first time, using a very fast connection (1Gb up, 80Mb down, very low-latency (5ms)) and I'm surprised by the performance.
All these numbers relate to using the EA API, not the EA user interface, which seems to perform fine - not as fast as a local QEAX file, but perfectly usable.
The difference when using the API - for read-only operations - between local QEAX and PCS/remote database performance seems to be a factor of 30-40. So an operation (just fetching the current package, then fetching each element from it in turn) is 200ms on a local repository, but around 4 sec using a cloud repository.
Note this just using the API directly: none of my code is being used.

Is this the expected result? Or am I just using a connection or a repository which needs some tuning? If so, what tuning should I do?
Thanks

8
Really? Not even once, when you really needed to make it go fast?
Thanks anyway

9
I have an application which needs to create a lot of new EA classes, each with some class attributes.
I have done all the performance tricks I can think of, including Repository.EnableUIUpdate=false, but the slow part of the process still seems to be the update to each attribute, after it is created: EA.Attribute.update.
Does anyone have any ideas for making this faster?
For scale, I have about 100 classes to create, and about 5-10 attributes for each one, so i'm cool that 500-1000 attributes will take a while, but if there is any way to make it faster, that would be great.

10
Interesting idea. This looks to apply when new elements are being created - my user is just exporting some data from a package using the EA API.
But thanks for the thought.

11
I have just had another customer report exactly the same error.
I also raised a bug report 2 years ago for this, but only got the normal reply from Sparx support.
Current customer is using EA 16.1, 64 bit, so I guess it has not been fixed.

@Sparx - please can you look at this again? Customer can't use this API call without this strange dialog appearing.
Thanks


12
I thinks we may be comparing apples with...beer.
I was doing lots of simple operations through the API, not doing big data transfers.

13
This is not a question - just an observation.
I've been testing some addins, using a variety of old repositories as test data.
And got confused about the results.
After a frustrating day, I finally found out that there is a big, and I mean BIG, HUGE, difference in the performance of EA 16 with QEAX vs the old EAPX format.
A factor of 20 - 50x !!
So if you are wondering why EA 16 is going slow with your old EAP files, just migrate them, and get an instant benefit.
Note that this is for Addins which use the API, so you ight not see the same effect using the UI.

14
So using my new best friend - ChatGPT - after a few iterations of 'no that didn't work, try something else', it came up with :

    Private Declare Function IsWindowVisible Lib "user32.dll" (ByVal hWnd As IntPtr) As Boolean

    Friend Function hasBeenClosedByEA() As Boolean
        Return Not IsWindowVisible(Me.Handle)

    End Function
So if I look into the cloudy depths of Windows, this 'IsWindowVisible' returns the true visibility status of the window.
@Sparx  please can we have a new API call to do this in a more friendly way?

15
Using the Addin Windows approach is proving to be a good solution to providing simple bits of UI, which a user can move around and dock etc.

I've come across an interesting challenge.

If a user has a particular Addin Window opened, and it's contents depend on what the user has got selected, then the polite behaviour is to handle the EA_OnContextItemChanged event from EA, and change the contents of the already opened Addin Window to show what's needed for the new element.
Exactly like the EA 'Properties' pane.

This works just fine.

But now the user closes the Addin Window, using the 'X' top right.
What seems to happen is that the Addin Window is still alive, but just not visible. @Sparx - can you confirm this?
The behaviour which a user would expect now is different. They closed the Addin Window, so when they select a different object, nothing interesting should happen. Because they closed the Addin Window. Just the same bevaviour as, for example, the EA Properties pane. If I close the Peroerties pane, then switching elements doesn't make it suddenly pop-up if I previously closed it.

But how to detect that the user previously closed the Addin Window? It seems to be still alive as a object, and the act of 'closing' it in EA doesn't seem to fire any windows events, like 'Dispose' or 'Handle_Destroyed', maybe because EA hasn't destroyed anything. Maybe EA just made it invisible. But how to find this out?

Has anyone else come across this issue? How to detect if an Addin Window has been opened, but then closed by the user.
Thanks

Pages: [1] 2 3 ... 34