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

Pages: [1]
1
General Board / Automation Server Problem
« on: September 12, 2003, 05:48:48 am »
When I use the Automation interface and try to access the ConnectorEnd Aggregation information, I get the following error;

"An unhandled exception of type 'System.Runtime.InteropServices.COMException' occurred in C3EAP1.exe

Additional information: Invalid access to memory location."

I am using C# and Windows XP with EA version 3.60.

Has anyone else had similar problems?

Thanks

Nick


2
Automation Interface, Add-Ins and Tools / EA Addin
« on: February 18, 2005, 09:55:10 am »
Hi,

Is it possible to set the focus to a specific element in the project browser and/or display the properties dialogue box for the element using the automation interface.

Thanks.

3
Automation Interface, Add-Ins and Tools / Re: C# Plugin
« on: March 09, 2005, 03:51:16 am »
Lario,

I don't know if you have been able to resolve this yet, but I had the same problem a while ago with a C# addin
and the only way I could resolve it as follows;

Where the help file says to add the deafult registry string as [project name].[class name], I had to add [name space].[class name].

Therefore, I had an addin where the class was called MyAddin and it was in a name space called EA.Addins.

The registry entry I had to use was;

Windows Registry Editor Version 5.00

[HKEY_CURRENT_USER\Software\Sparx Systems\EAAddIns\EA_AddIns]
@="EA.AddIns.MyAddin"

Cheers

Nick

4
Hi,

I had exactly the same problem when I upgraded from version 7.10.730 to the latest version.

The problem is, as you have spotted,  that the events are not firing.  When I roll back to the previous version of EA, everythisng is ok.

I am just about to file a bug reports.

Cheers

Nick :)

5
Hi Peter,

Thanks for your reply.

When I first upgraded, I did try re-adding the reference to EA as per the instructions in the help file but without success, i.e.

Microsoft C#

1. Select Enterprise Architect Object Model 2.0 from the list. (If this does not appear, go to the command line and re-register EA using ea.exe /unregister then ea.exe /register).

2. Create a new Windows Application project.  

3. From the Solution Explorer, right-click on References and select Add References from the menu.  

4. Click the COM tab.  

5. Click the button Select then OK.  


This time, however, I browsed directly to the interop dll instead of choosing from the list of Com objects and everything is working, including the colour and width properties, although I think I will need to add an entry directly to the t_Connector table to get the connector stereotype label on the diagram.

Many thanks

Nick

6
Thanks for your reply,

I have tried the Connector.Color property but the new connector still displays as black.

Here is the code I have tried (C#)

'connector' in this example is an existing Connector on this Element

Connector testCon = connectors.AddNew("", "StateFlow") as Connector;
                    testCon.Color = 255;
                    testCon.Width = 3;
                    testCon.SupplierID = connector.SupplierID;
                    testCon.Stereotype = "test";
                    testCon.Update();
repository.ReloadDiagram(d.DiagramID)


I am running EA version 4.10.730 if that makes a difference. I did upgrade to the latest version, but my addin wouldn't even display in the Addin menu because a number of the addin events stopped firing, including EA_GetMenuItems(), so I had to roll back.

The Connector is added to the Element and displays on the diagram but the colour and width are the defaults.

If I change the colour and Width throught the UI, I can see that the values have been entered in the t_Connector table LineColor and IsBold fields but if I add code to report the value of Connector.Color and Width, the value 0 is always returned.

If I set the values directly in the t_connector table, it has the desired effect on the Connector.

Other questions;

I can set the stereotype of the connector, as above, but the attached stereotype label does not appear on the diagram as it does if you do it through the UI.  Again I can see the entry in the t_connector table but can it be added via code.

I have noticed that the Repository.ReloadDiagram() and Repository.CloseDiagram() methods have no effect if the diagram in question is the only open diagram or it is the first open diagram in the tab order of open diagrams.  Is this a known problem or is it just me.

Thanks

                 

7
I would like to change the colour of a connector on a diagram using an EA Addin.

I have been able to change the colour of an element by adding "BCol=35723;BFol=9342520;" to the 'Style' property of the DiagramObject. (does anyone know where the colour values come from? I copied these from the help file).  Having done this though, I don't seem to be able to subsequently change the colour through the user interface.

However, when I add the same values to the 'Style' property of the DiagramLink object, there is no effect.

Am I doing this the in the correct way?

Thanks

8
Automation Interface, Add-Ins and Tools / Re: Error Using .NET Add-ins
« on: January 31, 2005, 01:19:22 am »
Hi,

Have you tried using 'object' as your return type?

Cheers

Nick :)

Pages: [1]