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

Pages: [1] 2
1
Bugs and Issues / Re: Removing DiagramLinks
« on: March 18, 2013, 03:43:21 pm »
ok thanks

2
Bugs and Issues / Removing DiagramLinks
« on: March 18, 2013, 12:30:00 pm »
Hi,

I have written an add-in (with version 9.3) in which I am trying to control the visibility of of certain connectors in certain diagrams.

Specifically I want to hide a specific type of connector in a specific type of diagram. I tried coding my add-in to delete the associated DiagramLink but found it impossible to actually delete it from the diagram's DiagramLinks collection (problem 1). So then I tried to simply set the IsHidden flag. This works BUT if I document the diagram in any way the connector shows up in the documented diagram (problem 2).

I am finding working with DiagramObjects and DiagramLinks rather difficult particularly in light of problem 1. In regard to problem 2 it seems the use of the IsHidden flag in EA is somewhat limited. Clearly the documantation functionality ignors it and similarly the opening of diagrams.

Is not being able to delete a DiagramLink through the API a bug or an artifact of how EA is implemented? I cannot see any logical reason why one shouldn't be able to (assumming I am not doing anything wrong in the way I am doing it).

Regards

3
Bugs and Issues / Event generation ordering issue
« on: April 03, 2012, 11:42:29 am »
I am trying to constrain how users can connect certain connector types that I have defined.

Its easy enough to to do this on creation of the connectors but once done so there is a interesting corner case in preventing an "illegal" change to the connector.

I have to use the EA_OnNotifyContextItemModified to catch the change however it I determin the change is "illegal" then I want to undo that but to undo a change I first need to know the state of the connector before the change. Ok so what I have done is save the relevent information either on creation or if the context is changed (via EA_OnContextItemChanged) This works fine except for the situation where the user selects the end of connector that is currently not in context and moves it all in one go. In this case the EA_OnNotifyContextItemModified event is called before EA_OnContextItemChanged. It would seem logical the order should be the other way around.

Regards
nick.

4
Bugs and Issues / possible bug with EA_OnPreNewDiagramObject
« on: December 12, 2011, 10:57:20 pm »
I am running EA 9.1 and am trying to create an Add-In where in part I want to control what can be placed on a specific diagram type.

I thought that the EA_OnPreNewDiagramObject callback would be the go.  My understanding is returning false from this callback would prevent the object in question from appearing in the diagram, however when my implementation returns "false" the obejct in question appears anyway (I have checked false is actually being returned in debug). Is this a bug ot is there something else I should be doing?  
Back to top  

5
of course!!! why didnt I think of that.  :o

Thanks

6
Hi,

I am having trouble creating a a package profile I have defined through an add. In the packages.AddNew(...) method. In the type parameter I have tried a couple of things including the metatype name I defined in the profile but I keep getting a generic package being created. Any ideas?

Thanks in advance

7
Quote
Quote
How would I add to TaggedValues a new TaggedValue of type refGUID (via code)?
The easiest way would be to define a stereotype that applies the tagged value (this will have to be done in a profile). Then via code you just create a stereotyped element and it will be created with the tagged value.

Quote
I didn't know you could restore an element that had been deleted from the model.
Export a package to XMI, delete the package, re-import the XMI :)

Well I have runs some experiments and discovered that when I set the value of a regular string type TaggedValue to the GUID of an element and then I delete the element lo and behold the value of the taggedvalue automatically becomes "".

I conclude then that when an element is deleted from the model EA does simple trawl through the model looking for any TaggedValue with the element's GUID and wipes them. Brilliant! Nice (undocumented) feature  ;)

8
Quote
Are you using "RefGUID" custom tagged value types? It appears that if you use one of those then the value is cleared if you delete the element that it references. (I just tried it)

[edit]This is how EA has worked since at least build 801. However, it probably shouldn't work that way. If you are referencing an element in a controlled package and you delete the element, the deleted element can be restored. When that happens, you would want all the referencing tagged values to still be referencing the element. We should probably fix this.[/edit]

I haven't used the refGUID predefined tagged value type. I was simply creating (in code) a tagged value (via AddNew() ) and setting the Value to the guid of the element I wanted to reference.

How would I add to TaggedValues a new TaggedValue of type refGUID (via code)?

I didn't know you could restore an element that had been deleted from the model.

Thanks

9
Hi,

I have been developing an addin and in some of my bespoke stereotypes I have a need to create taggedvalues in which I store the guid reference of some element in an EA Model. If I delete the referenced element from the EA model will EA automatically trawl through the EA model looking for and deleting any guid referring to the deleted element, or will I have to write code to do that?

Regards, Nick.

10
I am trying to deploy an Add-In that was built on a 32bit machine to windows 7 (64 bit) without much joy. Can anyone tell me how to do it?

Thanks in advance

Update: Problem solved. I wasn't aware of the need to use the correct version of regasm.exe according to OS being deployed to, 32 or 64 bit dll and .NET version. Thanks for the replies.

11
Doh of course

Geez a bit of consistency wouldn't go astray like perhaps for elements they might be of type EA.ElementTag, but oh no they are EA.TaggedValue!

Thanks heaps.

12
Help please!!!

I am having all sorts of grief accessing via my add-in my user defined tagged values within a connector.

I have defined a tagged value in my profile for a connector in the usual way and in EA itself everything works fine. However when I am trying to access the tagged value in the EA_OnNotifyContextItemModified event I keep getting an error that basically says the item in the collection cannot be cast to EA.TaggedValue. My code looks like this:

foreach(EA.TaggedValue tag in connector.TaggedValues)
{
.....
}

In debug I see there are items in connector.TaggedValues but as soon as an assignment is attempted by any means to 'tag' the error occurs.

I've had no problems doing similar things with tagged values within Elements but buggered if I can get it to work for connectors.

Any bright ideas??????

13
Is there an event generated when you attempt to move one end of a connector from one element to another?

Basically what I want to do is control what elements my stereotyped connector can connect to. I have no problem doing this when a new connector is made but once it is done I cant seem to find a way stopping it from being moved in an "illegal" way.

Thanks in advance

14
In creating a profile for new stereotypes (of UML::part) I have used the _image attribute to cause the label to be floating. Has anyone noticed that the selection area of such labels is really quite large? Having created a diagram with quite a lot of these objects it is a complete pain in the buttock that one is often selecting labels instead of the object intended, and it is equally annoying to have to manually resize the selection area on each to fix this. >:(

Anyway my real question is: Can the selection area of floating labels on profile stereotypes be set on creation (via profile definition or through an add-in)? It's a little thing but its one of those usability things that can really tick people off after a while.

Thanks in advance.

15
I am writing an Add-In and I want to create "part" like elements in that they behave like "parts" in diagrams, ie when they are embedded within another element they cannot be dragged out of the owning element. However I also want them to behave a bit like "ports" in that their shape and size cannot be altered. Can anyone help me?

I have scoured the documentation on how this might be done without success. I was wondering if Element.CustomProperties for Ports or Parts might be a means of achieving this but I have not been able to find any specific information on the CustomProperties of the various types of elements.

Thanks in advance

Pages: [1] 2