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

Pages: [1]
1
General Board / Re: Compartment Lines in Classes
« on: April 11, 2014, 10:25:34 pm »
Aaaand I'm back again. This works for classes, since they always have the line directly after the class name.

But if you have something like a component, which doesn't have any line until attributes or operations are added, it does not work.

Example: http://de.tinypic.com/r/2e4yyqa/8

Even though all visibility checkboxes are disabled, it still shows the first compartment line.

2
General Board / Re: Compartment Lines in Classes
« on: April 11, 2014, 06:58:47 pm »
Thanks Nizam! I'm using EA 8 and

Quote
  • In diagram's properties -> Element Tab, disabling Attributes & Operations

did the job. Great ;- )

3
General Board / Compartment Lines in Classes
« on: April 10, 2014, 01:24:45 am »
Dear Community,

if a class (or component) has methods and attributes, they get their own compartment - one for methods and one for attributes.

With the "feature visibility" feature (available via the context menu), I can disable the visibility of the attributes as well as the methods. Sadly, the compartments are still visible via the lines in the class - they do not disappear, even though the compartments are empty.

Please check the link below - the ClassA does not have any attributes or methods, while ClassB has both - the visibilty was disabled though.

Example: http://i57.tinypic.com/qn1v0l.png

Is it possible to hide the compartments, too? It would be great if there would be no difference between ClassA and ClassB as soon as I disable the visibility.

Thanks in advance.

4
General Board / Re: Find elements not used at any diagram to delet
« on: December 03, 2012, 10:58:37 pm »
Would be nice if you would share your solution, Helmut.

5
Automation Interface, Add-Ins and Tools / Re: Adding ScenarioExtensions
« on: January 16, 2013, 01:08:53 am »
I figured out how to solve / work around the issue:

The main problem was the weird handling of lists in EA.
First, I've created all the steps in the main flow, then I've created the alternate scenario and it's steps.
At last, I've updated the according step in the main flow - which changed the order of the steps in the list! The updated step was moved to the end of the list (as if the EA deletes, changes and reinserts the element?).

An example:
Step 1, Step 2, Step 3 are available for the main flow (in exactly this order).
After updating step 2, the order was changed to: Step 1, Step 3, Step 2

My solution is to attach the alternate scenario immediately, which means that I have to create all alternate / exception flows before I'm creating the main flow. But this way I won't have to deal with EA's strange behaviour. Perhaps there's something I still missed and another, more viable, option is available. But on the other hand nobody answered my post.

Just hoping I could help somebody else who stepped into that trap.

Thanks for your help.

6
Automation Interface, Add-Ins and Tools / Re: Adding ScenarioExtensions
« on: January 09, 2013, 02:29:28 am »
Thanks again, obviously I missed that piece.

Now I do have another problem - I've created the extension and it links to the right scenario, but I have a problem with setting the level for the extension. I can set the "Join" part, but the EA ignores my value for the position attribute.

I'm setting the position of the extension to "1" for example, then I'm performing an update and the level attribute will return "1a" via the API. Sounds pretty good, but if I'm taking a look at the Scenario tab of my Use Case in the EA GUI, it will always show me the position of the last step + a.
For example: If I have 5 steps and I'm setting the position to 1, the GUI will show "5a", while the API call directly after editing will return "1a".

First I thought that this may be an updating issue, but I'm updating all scenarios and their steps/extensions, as well as the use case itself.

Thanks for your help!

7
Automation Interface, Add-Ins and Tools / Re: Adding ScenarioExtensions
« on: January 09, 2013, 12:17:52 am »
Thank you very much!

Where can I find this documentation you speak of? The user guide doesn't provide this information.

8
Automation Interface, Add-Ins and Tools / Adding ScenarioExtensions
« on: January 08, 2013, 09:34:40 pm »
Hi,

I'm trying to create a new UseCase with different scenarios with my C# AddIn . While it isn't a problem adding new scenarios, I can't figure out how to link them.

A short example:
I have the "main flow" and the "alternative flow". The main flow has 5 steps, the alternative 3. Both scenarios exist and now I want to link the alternate route, beginning on (mainflow) step 2 and return on step 4.

If I understood correctly, I'll fetch the ScenarioStep number 2 of my mainflow Scenario. Then I will call
Code: [Select]
ScenarioExtension extension = (ScenarioExtension)entryPoint.Extensions.AddNew(alternativeFlow.Name, "ScenarioExtension");and everything should work just fine. But sadly, I'm getting the following error message: "Scenario specified by type argument not found"

I've updated / refreshed the UseCase and it's Scenario collection as well as the scenarios / steps themselves. But it does not make any difference.

Do you have any ideas? To be honest, I'm quite lost.

Thank you in advance!

9
Automation Interface, Add-Ins and Tools / Apply Stereotype
« on: December 07, 2012, 03:02:17 am »
Hi,

I'm creating with a C# AddIn a new element (UseCase) and want to apply a predefined stereotype with attached TaggedValues to this element.

Of course it isn't a problem to set the stereotype via Element.Stereotype = "", but this doesn't apply the stereotype to the UC-element. It just populates the stereotype field.

What can I do to get the TaggedValues and eventually the styles?

I'm using EA 8, I've seen that in the UserGuide for EA9 there is a "SynchProfile" method for the Repository object, but this method isn't available in EA8.

Thanks for your help.

10
Automation Interface, Add-Ins and Tools / Re: Find in all Diagrams
« on: December 03, 2012, 10:56:30 pm »
I had the same problem and got a solution for C# here:

http://www.sparxsystems.com/cgi-bin/yabb/YaBB.cgi?num=1348747488/4

Perhaps it will help you, too.

11
Do you see your AddIn unter "Add-Ins -> Manage Add-Ins" (might have another name in EA9)?

Do you start it via debugger out of Visual Studio?

12
Multi-Threading definitely works if you have one Thread for the GUI and one for the EA - I'm already using this to show a progress bar, while the other thread uses the API. But somehow it didn't work when I was trying to use the API with the fork thread.

Anyway, I do have an addition to your code above. While your code covers diagrams that have objects connected as "simple links", it doesn't include objects that were connected via "Instance of Element".
This query should fix it:

Code: [Select]
//C#
// repo is the EA.Repository
repo.SQLQuery(@"select d.Diagram_ID from t_diagramobjects d WHERE d.Object_ID IN  (select o.Object_ID from t_object o where o.Classifier = " + element.ElementID + " )");
I'm taking the elements in the t_object table which have the current element I am checking as "Classifier" (which is the base type of an instance). Then I'm comparing these elements with the t_DiagramObjects table like you did.

Thanks again for your help, this SQLQuery stuff offers a new dimension to my work with the EA. I didn't do that before.

13
Hi Geert,

thank you very much for your reply. I was using the iterate-over-all-diagrams approach and it took much too long for our model. Therefore I tried to distribute the task into threads, but somehow I couldn't get it running. Does the EA support threading with API calls? The thread froze when it tried to call an API function.

Anyway, this problem isn't that important anymore since I'll try to use your SQL query instead of my multi-thread approach - even though it would be interesting whether this would be possible.

Thanks again and I will get back to you as soon as this approach works :- )

14
Automation Interface, Add-Ins and Tools / Find in all diagrams via API
« on: September 27, 2012, 10:04:48 pm »
Hi Community,

I'm searching for a way to access the "find in all diagrams" functionality via the API. I suspect that this performs a search for the component in all existing diagrams? Or is there any kind of direct connection between a component and the diagram I didn't notice?

The rationale for my question is that I want to check whether the component is used in a special kind of diagram (i.e. a sequence diagram) - if so, some magic should happen.

Thank you in advance,
bctm

Pages: [1]