Book a Demo

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 - Danny F

Pages: [1] 2
1
Hi

When the user modifies an element I need to change the icon in the project tree (behavior like in an programming IDE)

How to go about that - any pointers ?

thanks

2
Hi

given : EA 9.3 using DBMS repository with required edit lock

when my add-in creates elements, they get automatically locked

except for diagrams ?

When I use diagram.ApplyUserLock() add-in related things (rename diagram for example) work

BUT : user cannot unlock the diagram  ??
So it stays locked indefinitely
(until an administrator steps in I would imagine)

We're all EA newbies here, so my first question is : should this work ?  
have we missed a configuration setting ?

thnx for any insight - help - solution










3
How does an add-in gets triggered when a pattern is dropped on a diagram ?

When I drop for example a GOF Pattern on a diagram I don't get an EA_On..... event called.
NONE ?

thanks in advance (again  :D )

4
Automation Interface, Add-Ins and Tools / reloaddiagram - system crash
« on: March 13, 2013, 09:24:09 pm »
     hi

the requirement :
- 2 states on a statechart diagram.
- when the user connects, disconnects or re-routes a connection between these to diagramobjects, the diagramobject changes color.

Solution (mine) :
- on a 'connect' action do a :
           Repository.SaveDiagram
           Repository.ReloadDiagram

For newly created connections and a delete of a connector this works.

When re-routing a connector (to a third state object) the system crashes.

this happens under EA 9.3 and EA 10.0
(Windows reports that they searching for a solutions but I don't really have a lot of faith in that  ;D )

a few more details for those who would want to investigate this ;)

For a new connection : the saveload is done in the EA_OnPostNew Connector

For a delete of a connection there is a trick to it :
The saveload is done in the EA_OnNotifyContextItemChanged on the diagram, which follows the delete action

For a re-route :
- saveload in the EA_OnNotifyContextItemModified : Crash

- the same trick as for delete doesn't work, because there is no EA_OnNotifyContextItemModified on the diagram following the re- routing  


Anybody any ideas ?

Many thanks in advance.








5
Hi, me again  :-[

how to NOT display the override operation dialog when creating a generalization

first : I know about the tools/option setting

But : Even if the option is checked I want to suppress the dialog !!

how ??

Repository.SuppressEADialogs in EA_OnPostNewConnector doesn't  seem to work
(neither calling it in the EA_OnPreNewConnector for that matter)

thanks again

6
Hi

I have a problem applying a profile defined connector via the add-in

This is the profile snippet

Code: [Select]
<Stereotype name="BusinessEventTransition" metatype="BusinessEventTransition" notes="" cx="90" cy="70" bgcolor="-1" fontcolor="-1" bordercolor="-1" borderwidth="-1" hideicon="0">
      <AppliesTo>
             <Apply type="StateFlow">
                  <Property name="direction" value="Source -&gt; Destination"/>
                  <Property name="kind" value=""/>
            </Apply>
      </AppliesTo>
</Stereotype>

this is the add-in code :
Code: [Select]
EA.Connector newStateFlow = Initial.Connectors.AddNew("", "BIMProfile::BusinessEventTransition");
However the connector created hash metatype="Dependency" and type = "dependency"

what am I doing wrong ?


BTW I've got this technique working on an EA.Element of type 'State'

As always big thanks





7
Hi

After (in) the EA_OnPostNewConnector the add-in can decide the connector should not be created.

How to proceed to remove the connector (apparently) already created ??

- this is a 'stateflow' connector on a FinalStateMachine diagram

- simply returning 'false' from EA_OnPostNewConnector doesn't suffice

As always : all and any help greatly appreciated.





8
When I get a EA_OnNotifyContextItemModified, I get the new values

Is there a way to
 - access/retrieve the previous values
to implement an undo

OR is there maybe an 'undo' provided ?  somehow, somewhere

thanks again

gr

9
Automation Interface, Add-Ins and Tools / prevent name change of package
« on: February 15, 2013, 08:53:14 pm »
How can I prevent the user from changing the name of a package ?

what I noticed
EA_OnNotifyContextItemModified is triggered 3 times !

what I tried
(this technique works for an EA.Element)

In EA_OnNotifyContextItemModified
- I change the package.element.name to the correct value
- I do an package.element.update();

-> the package.name is changed anyway !!

I also tried with package.Name in stead of thru the package.element
But then I get EA_OnNotifyContextItemModified  triggers on the element as well.

Debuggingthe happenings
I put a breakpoint on my reset of the name, in the midst of the EA_OnNotifyContextItemModified method

BUT ....... I noticed that the name of the package is already changed in the tree, visible on the UI !!!

proceeding with my reset has no effect what so ever.

I'm stuck  - without a clue :'(

gr and thanks in advance












10
Automation Interface, Add-Ins and Tools / storing (meta)data ?
« on: February 11, 2013, 10:29:07 pm »
Hi

If I would want to store additional information on an element which I want in no way to be available in the EA User interface, how could I do that ?

As an example :
If I want to store the fact that an element is created by my add-in (as opposed to created by the user via the interface)

Thanks in advance for any advise

gr

11
This is about property dialogs on an existing stateflow (transition)

When a user double-clicks or goes through the context menu of a stateflow (transition) I want to popup a custom dialog in stead of the EA provided dialog.

I know about Repository.suppressdialog tut I don't think it applicable in this case.


thanks in advance for any pointers

(Although by now I get by in C# - I'm in now way an expert - so be gentle please)

gr




12
Hi

Is there a way to access (list, ...) the stereotypes available in a particular MDG technology ?

My add-in has to validate if stereotypes used (in a model governed by the add-in) exist in the MDG technology.

I would be nice if I could do that without parsing the MDG technology xml file myself.

thanks

(using 9.3 )

13
Automation Interface, Add-Ins and Tools / Deep Delete element
« on: December 11, 2012, 01:37:10 am »
Hi

How can I react to a delete action on a diagram element (linked)

I want to delete it also from the model (as if the delete action was done on the element in the project browser)

for example deleting a connector on a diagram asks me if I want to delete it from the model or not.



Thanks


14
Automation Interface, Add-Ins and Tools / statechart
« on: December 19, 2012, 01:49:47 am »
Hi

Can anybody point me to some code that creates/manipulates a statechart (state machine)

specifically I'm not able to relate an existing Trigger(kind=signal) element to a transition(stateflow) in the statechart ???
Also the type (signal) I cannot set ??

Via the user interface one can add multiple triggers, selected from the project browser, to a stateflow.
How can I do this through code ?

thanks in advance






15
Automation Interface, Add-Ins and Tools / Add-in configuration how ?
« on: December 12, 2012, 06:24:20 pm »
Hi all

I'm writing an Add-In (Proof of concept)
Certain functionality in the add-in must be 'configurable'
for example : the add-in creates sub-package - but the parent-package should be configurable.

What would be the recommended way of realizing this

thanks

Pages: [1] 2