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 ... 3 4 [5] 6 7 ... 539
61
Martin,

Can you also explain how/why this is a problem for you?

Geert

62
Susanne,

It's not because you put components on a diagram (even a composite structure diagram) that they have some kind of relation to the owner element of the diagram.

The first thing I would think is that your components are actually owned by the owner object (they reside under the object in the project browser). In that case there is already a relation (ownership) between the objects, but unfortunately that relations is not easily detected and does not follow the same rules as other types of relationships.

If you wanted to you could, with the help of a little script, automatically add a relation between the owned elements and the owner, but you would have to run that script on a regular basis in order to keep the links in synch with the reality.

Geert

63
General Board / Re: Querying multiple optional tag values in SQLServer
« on: April 16, 2018, 11:03:51 pm »
The problem is that your where clause makes the left joins inner joins again by checking on the tv.Property.
So whenever a tagged is existent, the whole record won't show.

If you include that statement in "ON" statement you won't have that problem.

For SQL server you can do something like this:

Code: [Select]
SELECT o.ea_guid AS CLASSGUID,
       o.Object_Type AS CLASSTYPE,
       o.Name,
       tv1.Value AS tv1,
       tv2.Value AS tv1,
       tv3.Value AS tv1,
       ...
       tvn.Value AS tvn
FROM t_object o
     LEFT JOIN t_objectproperties tv1 ON tv1.Object_ID = o.Object_ID
                                                    AND tv1.Property = 'TVName1'
     LEFT JOIN t_objectproperties tv2 ON tv2.Object_ID = o.Object_ID
                                                    AND tv2.Property = 'TVName2'
     LEFT JOIN t_objectproperties tv3 ON tv3.Object_ID = o.Object_ID
                                                    AND tv3.Property = 'TVName3'
     ..
     LEFT JOIN t_objectproperties tvn ON tvn.Object_ID = o.Object_ID
                                                        AND tvn.Property = 'TVNameN'

For MS Access syntax you'll have to add parenthesis

Code: [Select]
SELECT o.ea_guid AS CLASSGUID,
       o.Object_Type AS CLASSTYPE,
       o.Name,
       tv1.Value AS tv1,
       tv2.Value AS tv1,
       tv3.Value AS tv1,
       ...
       tvn.Value AS tvn
FROM ((((t_object o
     LEFT JOIN t_objectproperties tv1 ON (tv1.Object_ID = o.Object_ID
                                                    AND tv1.Property = 'TVName1'))
     LEFT JOIN t_objectproperties tv2 ON (tv2.Object_ID = o.Object_ID
                                                    AND tv2.Property = 'TVName2'))
     LEFT JOIN t_objectproperties tv3 ON (tv3.Object_ID = o.Object_ID
                                                    AND tv3.Property = 'TVName3'))
     ..
     LEFT JOIN t_objectproperties tvn ON (tvn.Object_ID = o.Object_ID
                                                        AND tvn.Property = 'TVNameN'))

Geert

64
I'm not sure what is wrong here.
Have you tried first removing it and then reselecting it?
In a C# project you have to reference the Interop.EA.dll, maybe that works for VB as well?

I've only used VBA (from within Word or Excel) and C# recently.
The last time I did a VB project for EA was in 2005 :/

Geert

65
EA is 32 bit, so that is something to take into account.

In this (old post) http://sparxsystems.com/forums/smf/index.php?topic=5268.0 I suggested to the EA.tlb. Have you tried that?

Geert

66
Mick,

It would help if you posted the actual error message.
In the image you posted it is too blurry.

Geert

67
Geert - what do you mean by the updated schema?

The updated the database schema a bit. Nothing major, just some tweaks here and there.

Geert

68
The problem you are having (you should always include the actual error message) is because you are trying to cast an EA.DiagramObject to an EA.Element

Something like this should work a lot better.
Code: [Select]
var diagramObject = (EA.DiagramObject)diagram.DiagramObjects.AddNew("l=10;r=110;t=-20;b=-80", "");
Geert

69
Ha,

It seems like I ran into a similar issue in the past.
Workaround I used was to edit directly in the database:

Code: [Select]
'set the element of the diagramObject to the new action
updateDiagramObjectSQL = "update t_diagramobjects set object_id = "& callingActivity.ElementID &" where Diagram_ID = " & diagramObject.DiagramID & " and Object_ID = " & element.ElementID
Repository.Execute updateDiagramObjectSQL

Geert

70
Have you tried running the script and then opening the diagram?

Just to rule out the possibility that the diagram is showing a "cached" version of the truth.
If you change the ElementID of the diagramObject and then update it, then it is changed and it should become apparent when opening the diagram.

If you are still seeing the old element on the diagram instead of the new then you should carefully debug the code to see what is going wrong.

Geert

71
.eapx is just the new extension they are using for the old jet4 .eap files.

Geert

72
At the end of the script, I also have logic to update, save and reload the diagram but still the problem exists.
   diagram.Update()
   Repository.SaveDiagram(diagram.DiagramID)
   Repository.ReloadDiagram(diagram.DiagramID)

Prior to running the script, the old element has two diagram links on the diagram.  After execution, the old element has no links but still exists on the diagram.  When I manually add the element to the diagram, it shows up with the two links; these links did not exist prior to execution of the script.
No need to save the diagram I think.
Since you are seeing no links on the diagram, your code probably did what it was supposed to.
And if you can drag the "old" element back on the diagram then you are sure that it is not on there anymore. EA won't allow you to add an element to a diagram twice.

Geert

73
General Board / Re: Stereotype bulk change
« on: March 31, 2018, 05:00:22 pm »
Further to above post, just make sure you set StereotypeEx too (FQ Name)

Code: [Select]
Dim eaElem as EA.Element
set eaElem = Repository.GetElementByID (eaObj.ElementID)
eaElem.Type = "Event"
eaElem.Stereotype = "BPMN2.0::IntermediateEvent"
eaElem.StereotypeEx = "BPMN2.0::IntermediateEvent"
eaElem.Update


You should only set StereotypeEx, not Stereotype.

Geert

74
Does it work on the machine you developed it?
(meaning you let your IDE register the classes?)

In that case I would not even bother with regasm, but go straight for the installer, which you'll need anyway to properly distribute your add-in.

In one of the other articles I explained the steps involved in creating an msi for your add-in.

Another problem we sometimes faced was a wrong entry in one of the registry keys.

This was posted as a response on another forum topic and helped quite a few people with install issues.

Quote
We have seen some strange problems like this when someone (or something?) has set a default value at the top of the HKEY_CURRENT_USER registry hive.

We have seen cases with other customers where something has set a value there it causes problems when EA tries to query the [HKEY_CURRENT_USER\Software\Sparx Systems\EAAddins] key.  For some reason when the key being requested does not exist, the Windows API returns whatever value was set at the top of HKEY_CURRENT_USER instead.

Try selecting the (Default) value directly under HKEY_CURRENT_USER, then Right-click | Delete it.  (not the HKEY_CURRENT_USER key itself, just it's default value).

The (Default) value should say (value not set) next to it.  If you see a different value, or a blank value, delete the (default).

Usual caveats apply here - be very careful when messing about in the registry or you may kill your Windows installation.

Geert

75
Hello ,

We are also facing same issue.in EA10 our model size was 650MB after shifting to EA13 it increased to 900 MB

Is there any specific reason for this increase?

Seems like an awful large model. Are you sure you are not dragging along a bunch of (useless) old auditing data?

Geert

Pages: 1 ... 3 4 [5] 6 7 ... 539