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 - yonatan.lehman

Pages: [1] 2 3 4
1
Automation Interface, Add-Ins and Tools / undoing checkout on a branch
« on: September 20, 2022, 04:52:19 am »
I want to do an uncheckout on an entire branch in the same way I can do check out branch and check in branch.

Way back in 2014 this was not available,
https://sparxsystems.com/forums/smf/index.php/topic,25186.msg200688/topicseen.html#msg200688

In EA 14 it's not available via the GUI.

I'm fine to write a script that will walk down a branch and undo each package - but I couldn't find an API to undo checkout even on a single package.
Am I missing something?
Perhaps this is available in EA 16?
Is there a good reason why this is not available?

Cheers
Yonatan



2
General Board / upgrading from EA 14 to EA 16
« on: September 06, 2022, 10:19:42 pm »
Hi
We're about to jump from EA14 + Eapx file  to EA16 + SQL server
1) Are there any issues with mixed usage of E14 and EA16 (some users might stay with EA14 initially)
2) Any tips or warnings about making this double move ? (version and local to server)
Thanks

3
PCS General Board / Re: DBMS recomendations
« on: August 09, 2022, 12:08:26 am »
Can I expect any latency issues when working with a DBMS assuming a reasonable bandwidth home connection of say 100Mbit?

4
PCS General Board / DBMS recomendations
« on: August 08, 2022, 03:28:16 pm »
Hi
We are considering moving from EA14 with eaxp files over VSN to EA16 with a DBMS server.

Can anyone recommend a preferred DBMS  - or alternatively recommend to continue working with SQLite file repository over VSN  - or perhaps we should be looking at the proCloud solution ?

I'm looking for speed and trouble free operation. We're about 6 people modeling a system which will eventually grow to about 1000 modules (components) and 10000 Activities.

The options provided by Sparx is:
  • Firebird from v2
  • MySQL from v5
  • MariaDB
  • Microsoft SQL Server from 2005, all editions including Express and Azure SQL Database
  • Microsoft Access from 2007
  • Oracle from 9i (all editions)
  • PostgreSQL from v8
Thanks !

5
General Board / shortcuts for connector types EA14
« on: July 20, 2022, 05:29:45 pm »
I spent a lot of time drawing Activity diagrams (in EA 14)

Most of the connectors I draw are
- Control Flow
- Line Style Orthogonal Square

At the moment this takes a lot of clicking - there are 3 ways to choose a Control Flow (depending on what you are connecting) and I have to set the Line Style explicitly on every line.

Is there a way to change the default Line Style, or to define a keyboard shortcut that will set a connector type and Line Style?

The only think I found in the help was "F3 - create another connector of the same type as the last connector you used" - but nothing happened when I used F3.

For the curious this is what I'm doing at the moment:

1) Select Element, Quick Link, Drag
   a) Depending on what is being connected I get a different Dialog so
         i) Select Control Flow, 
         ii) Select Control Flow>Control Flow,
         iii)Curse-escape-select Control Flow from Toolbox
   b) connect the Source to the Target

2) Select Connector > Line Style > Orthogonal Square

I did find "Apply Line Style on Diagram" - but that doesn't really help unless I first draw all the lines on the diagram and then start laying out the connectors.

Thanks

6
Bugs and Issues / Re: ever growing eaxp file
« on: July 14, 2022, 05:43:02 am »
Hm. But SQLite means moving from v14 to V16 - which I'd like to do - but what is the cost/risk of that ride ?

7
Bugs and Issues / Re: ever growing eaxp file
« on: July 13, 2022, 11:56:42 pm »
Thanks All.
So from what I read up, it looks that we'll need to go for a DB or perhaps to a Pro Cloud server solution if we can't get a good bandwidth for people working from home - right ?

Any tips regarding which way to go for the smoothest ride ?



8
Bugs and Issues / ever growing eaxp file
« on: July 11, 2022, 11:59:20 pm »
We use E 14.0 on top of SVP. Each user copies the eaxp file from the repository into a local folder and then works on that.
Recently we have noticed that this file grows very quickly and at some point reaches 2GB and get latest stops working.
Here is a typical scenario
1) eapx file size is 31,891,456  bytes
2) we check a branch out with about 50 elements - the file size changes to 83,652,608 bytes
3) We check the branc back in without change
4) We check out the same branch again - the file size changes to 135,012,352

We are pretty sure that the underlying model did not change between checkouts - it looks like the acrion of checking out seems to increase the eaxp file even though nothing in the model has changed.

Running compaction on the eaxp reduced it back near to where it started -  31,870,976 bytes

Can someone explain what is going on and how we can prevent the eapx file growing?

9
Based on JScript-Dialog
the VB equivilent of
   set openFileDialog = CreateObject("MSComDlg.CommonDialog")
is
  var openFileDialog = new ActiveXObject("MSComDlg.CommonDialog");

But when I do this (as a 1st step before trying to change it to "Shell.Application")
I get an Error Dialog:

Automation server can't create object


I guess I need to set some permission - but how ?

11
Hi
I can ask the user to select a file using Repository.InvokeFileDialog  or use DLGOpenFile from EAScriptLBi.JScript-Dialog.

How do I open a dialog that allows the user to select (or create) a directory (folder)?
I know almost nothing about VB - so a good example in JS, or can be converted to JS would be great!

Thanks

12
Hi
I'm trying to add an Action defined by our MDG toolbox. But the shape and fill color depends on how I add it to the Diagram.

1) I get the correct shape and fill color when I use the Add to Diagram button from the Find Toolbox item dialog. A rectangle with rounded edges and fill as defined by the Layout>Style>Default Style

2) When I drag it from the Toolbox (after doing Activate Toolbox), (or from the Find Toolbox Item) it comes out with the wrong color and a shape that depends on the Kind that I set as default (using Ctrl Drag)'

The correct-looking Action has no Kind - and I couldn't get the dragged Action to look the same.

I also noticed that the Package of the correct-looking action is the same as the Diagram - but the Package of the dragged action is from a different package (called Activity Template funnily enough - is this a reserved name in EA?)

Keeping the Find Toolbox item open all the time and clicking Add to Diagram and then moving the Action to where I want it is very inconvenient - Does anyone know how I can get the dragged Action to look the same as the Add to Diagram?

Thanks


13
Ah - the secret is in the
set newPackage = Repository.GetPackageByGuid(package.PackageGUID)
_ I tried ByID and not ByGuid....

Regarding the following lines - I assume isRequireUserLockEnabled is your function and not part of EA.
In what scenario do you use UserLock ? (as opposed to check-in/out)
Code: [Select]
    if isRequireUserLockEnabled() then
isReadWrite = package.ApplyUserLockRecursive(true, true, true)
   else
isReadWrite = true
   end if


Thanks as always Geert - You're the greatest - pity you use VB - what an ugly language   ;)

14
Hi
As far as I know, EA (14) does not have a way to do "get latest" for a tree of packages.
You can either do get all  latest  on the entire project tree or get latest on a single package.
I tried to write a script to do this :

Code: [Select]
var forceImport = true;
function process_package(aPackage) {
var thePackage As EA.Package
thePackage = aPackage;

if (thePackage.IsVersionControlled) {
thePackage.VersionControlGetLatest(forceImport);
thePackage.Update();
}

for (var p = 0; p < thePackage.Packages.Count; p++ ){
pkg = thePackage.Packages.GetAt(p);
process_package(pkg);
}
thePackage.Update();
}

Problems
1) After the call to thePackage.VersionControlGetLatest the package has no sub packages (thePackage.Packages.Count == 0) - even though after the script runs I can see the sub-projects in the project tree, and indeed when I run the script again, this time the script sees the children.

I can run the script multiple times, but this is slow, doing get latest on each package multiple times, - and I can't think of a simple way of knowing if I've already done get latest on a package and I've reached the bottom level packages of the tree.

Any solutions?


15
I finally got it to work. Posting here in case it's useful to others, and because I'm curious if I understood what was wrong and fixed it correctly and if all the steps are really necessary

Highlights:
1) When moving a source diagram or element S to a destination package or element D:
  a) set S.PackageID to the D.PackageID as a 1st step
  b) After setting the PackageID
      i) if the destination is a Package set the S.ParentID to zero
     ii) If the destination is an Element set S.ParentID to D. ElementId.
2) To make sure the UI is updated
   a)  before moving anything do
Code: [Select]
          Repository.EnableUIUpdates(false)   b)    After moving everything do
Code: [Select]
         Repository.RefreshModelView(theSrc.PackageID)
Repository.RefreshModelView(theDest.PackageID)

Code: [Select]
function transferObjects(src, dest) {
var theSrc as EA.Package;
theSrc = src;
var theDest as EA.Element
theDest = dest;
var transferToPackage;
     transferToPackage =  (theDest.Type == "Package");
Repository.EnableUIUpdates(false);
for (var i=0; i<src.Elements.Count; i++) {
var e as EA.Element;
elem = src.Elements.GetAt(i);
if (transferToPackage) {
elem.PackageID = dest.PackageID;
elem.ParentID =0;
} else {
elem.PackageID = dest.PackageID;
elem.ParentID = dest.ElementId;
}
elem.Update()
}
for (var i=0; i<src.Diagrams.Count; i++) {
var dsrc as EA.Diagram;
diag = theSrc.Diagrams.GetAt(i);
if (transferToPackage) {
diag.PackageID = theDest.PackageID;
diag.ParentID = 0
} else {
diag.PackageID = dest.PackageID;
diag.ParentID = theDest.ElementId;
}
diag.Update();
//dest.Update();
}
theSrc.Update();
theDest.Update();
Repository.RefreshModelView(theSrc.PackageID)
Repository.RefreshModelView(theDest.PackageID)
 }

Pages: [1] 2 3 4