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

Pages: [1] 2 3 ... 14
1
I have the following situation
Package A
  - Class A
Package B
 Diagram B -> contains Class A

Both Package A and Package B are version controlled separately and checked in separately
Now I
- check out Package B
- remove Class A from my Diagram B
- save Diagram B
- check in Package B

Then I get a dialog saying that there are possibly missing cross references with an entry saying Diagram Contents with a count of 1 By default the checkbox is checked.
Since I have no means to figure out which diagram contents EA is talking about, the safe thing seems to be to accept the default setting and click OK.

Nothing weird happens, so I'm happy... that is until (might be months later) I do a checkout of Package B
Suddenly I notice that class A is back on my diagram B, although I removed it previously.
I think that is a clear bug.
I can imagine having safeguards for situation where I would be editing package B in a model that doesn't contain Package A, but in this case it the diagram object is part of Package B, so whether or not it is deleted has nothing to do with external references.

Geert

2
Bugs and Issues / RefGUIDList tagged value not saved
« on: January 04, 2018, 07:39:54 pm »
If you select another entity in a RefGUIDList tagged value with the same name as the previous entity then the new value is not saved.

Steps to Reproduce:
Create RefGUIDList tagged value that references attributes like this
Type=RefGUIDList;
Values=Attribute;
AppliesTo=Attribute;
Add this tagged value to an attribute.
Select an attribute with name "A"
Select something else
Now select the same attribute again and select a different attribute with name "A"
Select something else
Go back to the attribute with the tagged value
Notice that the tagged value still references the first attribute with name "A"

Reported

Geert

3
Bugs and Issues / Exclude filter does not exclude initial state node
« on: December 19, 2017, 07:48:53 pm »
When you set the exclude filter to exclude everything except for StateMachine and Activity then you still get entries for Initial Statenode entities.
Only after setting the element filter to ObjectType oneOf 'StateMachine','Activity' did it filter out the Initial nodes.

Geert

-- Reported --

4
Bugs and Issues / How to delete a style in version 13+?
« on: December 07, 2017, 07:48:28 pm »
Since version 13 I don't seem to be able to delete styles anymore.
In version 12 there was a delete button on the "Edit Stylesheet" dialog, but in version 13 that button is no longer there.
(I now open the stylesheet in v12 in order to delete a style)

Anyone know if this has been moved to another location, or is that just an oversight?

Geert

5
Very often when writing scripts I have to do something with a selection of elements in the selected package or or nested packages.
Because iterating all elements of all packages recursively is very slow, I usually try to get the elements I need using an SQL query.

Now when using SQL searches you can use the macro #Branch# to get all package ID's of the currently selected package and all nested packages. Because that macro can't be used in scripting I'm making the package ID string myself. This works ok, but it is not super fast. In the model I was using it on this function alone took about 4 minutes (of the 11 minutes of the whole script)
Does anyone have an idea for a more efficient implementation?
I guess I could bypass the API completely and rely only on database queries to get the ID's of all the packages.

Code: [Select]
'get the package id string of the given package tree
function getPackageTreeIDString(package)
'initialize at "0"
getPackageTreeIDString = "0"
dim packageTree
dim currentPackage as EA.Package
if not package is nothing then
'get the whole tree of the selected package
set packageTree = getPackageTree(package)
' get the id string of the tree
getPackageTreeIDString = makePackageIDString(packageTree)
end if
end function

'returns an ArrayList of the given package and all its subpackages recursively
function getPackageTree(package)
dim packageList
set packageList = CreateObject("System.Collections.ArrayList")
addPackagesToList package, packageList
set getPackageTree = packageList
end function

'add the given package and all subPackges to the list (recursively
function addPackagesToList(package, packageList)
dim subPackage as EA.Package
'add the package itself
packageList.Add package
'add subpackages
for each subPackage in package.Packages
addPackagesToList subPackage, packageList
next
end function

'make an id string out of the package ID of the given packages
function makePackageIDString(packages)
dim package as EA.Package
dim idString
idString = ""
dim addComma
addComma = false
for each package in packages
if addComma then
idString = idString & ","
else
addComma = true
end if
idString = idString & package.PackageID
next
'if there are no packages then we return "0"
if idString = "" then
idString = "0"
end if
'return idString
makePackageIDString = idString
end function

Geert

6
Bugs and Issues / attribute order messed up
« on: November 16, 2017, 07:12:04 pm »
When deleting attributes the positions of the attributes are not recalculated. This results in inconsistent behavior when adding attributes and changing their order.

This is a serious problem for anyone doing any type of code generation (xml, DDL)

Current workaround is to move the new attribute all the way to the first position and then back. This triggers a recalculation of the position for all attributes.


Steps to Reproduce:
- turn off alphabetic ordering for attributes
- Create class with following attributes
Pos name
----------- ----
0 z
1 q
2 n
3 h
4 a

- Delete "n" and "h" I'm and notice the missing pos 2 and 3

Pos name
----------- ----
0 z
1 q
4 a

- Add "m" to the end and save
- Notice that m has gotten pos 3 and is therefore placed between q and m instead of at the end.

Pos name
----------- ----
0 z
1 q
4 a
3 m

7
Automation Interface, Add-Ins and Tools / Repository.SaveImageToPath
« on: November 09, 2017, 09:54:54 pm »
I just found this operation on the EA.Repository class, but it doesn't seem to be documented.
Does anyone have any idea what it does?

Geert

8
Bugs and Issues / Bug when copying package
« on: October 19, 2017, 12:31:55 am »
When copying a package you can get nasty side effect if other classes are depending on classes in the copied package.
E.g. classes in other packages that have a generalization to classes being copied now have two generalizations. One to the original, and one to the copied class.

Steps to Reproduce:
- create packageA with classA
- create packageB with classB
- create generalization from classB to classA
- copy packageA (full structure for duplication)
- paste packageA resulting in a copy of packageA
- notice that classB now has two generalizations. One to the original ClassA, and one to the copied ClassA.

Reported

Geert

9
I just got a change request for one of my add-ins to export a .png of every diagram in scope (selected package tree), along with the xmi export it is already doing.

Now I'm a bit concerned about the performance. I'm afraid export diagram images for each and every diagram is going to be very slow, and if I remember correct EA will also open each and every single diagram before exporting its image to a file.
So that would not be a good user experience.

Now with EA 13 there is an option to cache the diagram images upon saving a diagram.
I was thinking that that might be a much quicker way to get the export I need since the images are already there and I just need to pour them into the right file format.

Has anyone done something similar before?
Where does EA store the cache? (in t_document?)

Any helpful hint is much appreciated.

thanks

Geert

10
Bugs and Issues / Exception & crash when using Repository.GeElemementByID()
« on: September 28, 2017, 04:03:33 pm »
In very specific circumstances using Repository.GetElementByID() by an add-in results in a stackoverflow or other non recoverable exception, resulting in the immediate shutdown of EA.

The weird thing is that it worked just fine seconds before, but apparently, right after clicking OK on the connector dialog, the system is in some kind of corrupted state and is not able anymore to get the element by it's ID


Steps to Reproduce:
- Create new class by dragging class icon from toolbox onto diagram that already contains another class
- Press OK on the dialog box for the class (resulting in something like Class1 with no other details)
- Select the association connector from the toolbox and drag the new association from the new class to an existing class.
- Doubleclick on the association and fill in source role, target role, source multiplicity and target multiplicity
- Press OK
- Now immediately use the function Repository.GetElementByID() in an add-in with the ID of the new class. Notice that EA crashes.

You can also see the result when using a script. right before opening the connector dialog it works just fine. Right after closing the dialog the script reports an error (but for some reason now EA doesn't crash)

Bug reported.

Geert

11
Bugs and Issues / hard crash on editing new association in v13.5
« on: May 25, 2017, 12:31:14 am »
When I do the following
- Create a new class
- create a new association from the quicklinked
- doubleclick on the association to open its properties
- fill in the name of the association
- fill in the source name, target name, source multiplicity, target multiplicity
- press OK

EA crashes hard (as in completely gone with useless windows windows box asking me if I want to debug or close it)

After disabling all add-ins the problems seems to be solved.
I'll be activating each add-in one by one to try and figure out what is causing this issue.
Anyway, with the same set of add-ins this didn't used to happen in any previous version.

To be continued...

12
Automation Interface, Add-Ins and Tools / Zipping MDZip files
« on: May 10, 2017, 03:30:27 pm »
Hi,


A client of mine is going through the process of migrating their Magicdraw models to Enterprise Architect.
Because of some issues in transferring the models we wanted to unzip the mdzip files, change the xmi contents, and then rezip them in order to import them into EA.

But for some reason that doesn't seems to work. Even without changing anything to the contents, just unzipping and rezipping the file and then trying to import it into EA we get "analyzing mdzip file" for a few seconds and then it stops.
I'm suspecting that we are using the wrong zip settings to rezip the file.

Does anyone know which settings we should use to produce a valid mdzip file that can be imported into Enterprise Architect?

Thanks

Geert

13
The UMM/UPCC3 method uses inheritance to assemble enumerations.
One enumeration could inherit from different other enumerations with the intention of combining the values of all the parent enumerations.
The problem is that currently the Schema Composer doesn't allow the selection of those "inherited" enumeration literals. As a workaround we have to copy all the values down to the assembled enumerations, but that is error prone and not according to the UN/CEFACT recommendations.
Please allow inherited enumeration literals to be selected in the schema composer exactly like we can do with inherited attributes.

Thanks

Geert

(Feature request sent)

14
I'm working on a document that should be printed in either dutch or English. We store the English name in the name, and the Dutch name in the Alias.
The problem is that the Dutch name is not always filled in. In those cases I should print the English name.

Does anyone have a bright idea on how to do that?
With the Start/End bookmarks I can hide something when not filled in, but I cannot do the opposite, show something else if a field is not filled in.

The only solution I see at the moment is to go completely SQL or Script, but I'd rather avoid that.
A feature like 'Use Alias if Available' for reports would be ideal.

Thanks

Geert

15
Hi,

Does anyone has a shapescript example of how to make an attributes compartment, pretty much the same as in regular UML classes?

I checked my library, and the examples in the help, but I couldn't locate such an example.

Thanks

Geert

Pages: [1] 2 3 ... 14