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 - MeryemAdb

Pages: [1] 2
1
When you create the toolbox, you can also reference UML::SendEvent or UML::ReceiveEvent.

The complete list of elements you can use is available here:
http://www.sparxsystems.com/enterprise_architect_user_guide/11/extending_uml_models/elements_used_in_toolboxes.html

2
Automation Interface, Add-Ins and Tools / Re: Extend a profile
« on: December 19, 2015, 02:49:05 am »
That's great news !

How ?

3
The documentation says that you have to define your stereotype as a metatype (see http://www.sparxsystems.com/enterprise_architect_user_guide/12/extending_uml_models/defining_a_stereotype_as_a_met.html) but testing it, it does not seem to work for auto naming  for a GUIElement :-/

4
Automation Interface, Add-Ins and Tools / Extend a profile
« on: December 16, 2015, 12:32:58 am »
Hello,

I have a UML profile defined in a technology file (loaded from an add-in with EA_OnInitializeTechnologies).

I want to create a new technology file (also loaded from a different add-in) with the definition of a new type of diagram, and I'd like to be able to modify the appearance of some stereotypes defined in my technology A when they appear on the diagram defined in B. Is there a way to do so ?

So far I tried to redefine some stereotypes of A in B, but I'd have to make sure B is loaded after A, which I do not know how to do.

5
Hello,

I am developing a MDG technology included with my Add-In. Amongst the many things I'd like to do with the MDG technology is having a custom Workspace Layout.

The add-in, and its technology, should be compatible with EA version 10 and higher, and I am currently using version 12. Yet, unless I am mistaken, Workspace Layouts saved with version 12 of EA are not compatible with older versions. So for now, I downgrade EA before saving the layout (luckily I can do that), but I hope there exists a better solution.

Thanks in advance

6
Hello,

In my Add-In, I create a new diagram with classes on it. To avoid having to think about where to locate those classes, I put them all in the top-left corner of the diagram then apply "LayoutDiagramEx". It works well.

The problem I have is that I now want to add a note and a hyperlink to an EA command in my diagram. If I do so, LayoutDiagramEx does not seem to move those two elements and they are superposed in the final diagram. For now, I have slighty moved the note, so it can be partially over another element of the diagram, but at least it does not cover entierely the hyperlink. But this is not ideal.

Is there something I am missing ? It also seems that diagram layout from EA interface does not move notes or hyperlinks, so I'd say it cannot be done with API method, but I am still hoping that there is a solution.

I am currently using EA v10.0.1008.

7
Automation Interface, Add-Ins and Tools / Re: RoleTag and notes
« on: June 16, 2015, 08:17:39 pm »
Thanks to the both of you. I now have the ability to do what I want (now to decide if I will do it or deem it not that useful...)

8
Automation Interface, Add-Ins and Tools / Re: RoleTag and notes
« on: June 16, 2015, 06:57:28 pm »
Yeah but I do not know how to create a Note for a RoleTag (tagged value on a connector end).

9
Automation Interface, Add-Ins and Tools / RoleTag and notes
« on: June 16, 2015, 06:38:06 pm »
Hello,

In my AddIn I set tagged values for classes, attributes, connectors and connector ends.

I think one user just had a bug because the value to set was too big (for an attribute), so I'd like to improve the method used to create or edit the tagged value. If the value has more than 255 characters, I'd like to use "<memo>" as the value and put the actual value in the notes (as is explained in the documentation).

The only problem remaining is that this method is not explained in the documentation for RoleTags, and they do not have a Note attribute. I cannot use the method from my AddIn, while it is possible to set a Note for a RoleTag from EA interface.

What should I do ? I am currently using EA version 11 but I'd want a solution that works for versions 10 and higher.

Thanks in advance.


10
It does not work either with EA 12.

I wonder if it can be due to navigability. In order to be able to modify the navigability on either end of the connector, before relaoding the diagram, I set the direction of the connector appropriately (if source is navigable and not target, I set the direction as Destination -> Source, if neither is, I set it as Unspecified and so on). but maybe it is not consistent with aggregation (on the Client end, because setting aggregation on the Supplier end works).

Edited To Add:
If in the code posted above I do not update the relation at all (but only each connector end after I modified it)  and do not set the direction, I have the same results:
 + navigability works on both side of the connector.
 + aggregation only works on the connector end I modified first (I only try to set aggregation on one side of the relation at a time)

So even if it does not change anything from a practical point of view (I still cannot modify aggregation on either sides of the relation), at least it is now somewhat logical.

11
Thanks for the replies.

I have not tested for version 12 but I'd rather find a solution that works for versions 10 to 12. I do not know what version my users will be using.

As for the fact that there cannot be an aggregation on both ends, my booleans agg1 and agg2 cannot be both true at the same time. But I suppose when I first change the aggregation on one end it is possible that the aggregations are temporarily non consistent. I will try to modify the code in order to change aggregations on both ends at the same time.

12
Hi,
I have the same problem.

My add-in allows editing a connector, in order to modify the role, cardinality, navigability (Navigable or Unspecified) and Aggregation (shared or none) on either side.
It worked on EA 10 but not anymore on EA 11.

Here is a simplified version of what I do (I use my own class to store the characteristics of each side of the relation, so I cleaned up the use of my classes):

Code: [Select]
relation.SupplierEnd.Aggregation = agg1 ? 1 : 0;
relation.SupplierEnd.Navigable = nav1? "Navigable" : "Unspecified";
relation.SupplierEnd.Cardinality = card1;
relation.SupplierEnd.Role = role1;
relation.SupplierEnd.Update();
relation.Update();
relation.ClientEnd.Aggregation = agg2 ? 1 : 0;
relation.ClientEnd.Navigable = nav2 ? "Navigable" : "Unspecified";
relation.ClientEnd.Cardinality = card2;
relation.ClientEnd.Role = role2;
relation.ClientEnd.Update();
relation.Update();
repository.ReloadDiagram(diagram.DiagramID);

The relation I am testing this on is an association, and if I follow what happens with a debugger, I see that the aggregation is actually modified (set to 1) at least until after I reload the diagram.

One last mystery: the modification is only effective for the SupplierEnd of the relation NO MATTER which end I update first.

At one point I tried to modify the direction of the relation so it was consistent with both navigabilities, but it did not improve things.

Any idea will be greatly appreciated.

13
No problem, you could not guess.

I did what I suggested earlier, that is to say find all diagrams on which the classes on each side of the connector appear, then parse the diagramlinks and hide the one representing my connector. This is not an elegant or optimal solution, but at least it works.

Fo Qwerty, I understand your point of view, but I think my case is an exception. I have a method on how to model use cases, in particular restricting on which diagram(s) each information can appear. However, I want to create some more diagrams for communication purposes, and on those diagrams I want to show some relations that are only implicit with my method (for example, that an element is a sub-element of another). I only create new connectors so that the conceptual link between elements is displayed on the diagram, but they do not add any information, that is why they are hidden except on the diagram for which they were created.

14
I suppose I would have guessed that  :) What I have not guessed (yet ?) is how to do it from my add-in.

If a query to find the diagram links does not work, will a query to find all diagrams on which the elements on both ends of the connector be a way to achieve what I want ?

By the way, that's "she".

15
Automation Interface, Add-Ins and Tools / Hide connectors from an Add-In
« on: November 06, 2014, 03:09:24 am »
Hello,

I am trying to create a new diagram with automatically generated connectors that are specific to the diagram.  So I'd like to do three things:
  • when I create the diagram, I want to show on it only the connectors that are relevant --> so I set the values of IsHidden to true for the other DiagramLinks. It works, the other connectors do not appear on my new diagram.
  • when I create the diagram, I do not want my new connectors to appear elsewhere --> at the end of the function to create the diagram, I do a SQL query to find all diagrams on which the connectors appear and set the IHidden attribute to true. Unfortunately, the query only returns my new diagram, while the classes on both ends of my new connector appears on another diagram and therefore the connector will at one point appear on it too.
  • I want to make sure that whenever a diagram is modified, my generated connectors do not appear --> I use EA_OnPostNewDiagramObject to check that no connector with the right combination of stereotype and tagged value is on the diagram, otherwise I hide it.  When I reload the current diagram, the connectors are indeed hidden but EA crashes.

I am sure all my problems come from the fact that my model is not correctly "refreshed" when I try to look for the diagrams with my connectors or when I try to reload the current diagram, but I have no idea how to refresh it properly.

Pages: [1] 2