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

Pages: 1 ... 6 7 [8]
106
Automation Interface, Add-Ins and Tools / Re-connection of a Connector
« on: November 27, 2008, 03:10:21 am »
Hi All

I am working on an add-in that deals with connectors and I need to detect if a connector is being re-connected using the dragging to a new element method.

My add-in is registered to receive the event EA_OnNotifyContextItemModified and at the momment, I simply display a simple dialog capturing the connector GUID, names of the elements using clientId and supplierID as shown in the code below:

public void EA_OnNotifyContextItemModified(EA.Repository Repository, string GUID, EA.ObjectType type)
        {

            if (type.ToString() == "otConnector")
            {
                EA.IDualConnector theConnector = Repository.GetConnectorByGuid(GUID);
                string[] details = new string[3];
                int clientID = theConnector.ClientID;
                int supplierID = theConnector.SupplierID;
                details[0] = "client : " + Repository.GetElementByID(clientID).Name;
                details[1] = "supplier : " + Repository.GetElementByID(supplierID).Name;
                details[2] = "connector GUID : " + GUID;
                debugForm = new DebugForm(details);
                debugForm.Text += " : Modified";
                debugForm.ShowDialog();
            }
        }

All works well, when I move a connector which starts at Element A (the client) from its supplier (Element B) to a new supplier (Element C), the event is captured twice.

This I would expect since the connector is being disconnected and re-connected (two changes), but the client and supplier info is the same in both events. Specifically, only the new supplier info is shown.

Is there any method of detecting the original supplierID and the new supplierID when a connector is moved in this manner?

Hope what I seeking to do is clear in the above

Cheers

107
Automation Interface, Add-Ins and Tools / Placing Diagrams to Clipboard
« on: October 06, 2008, 11:29:02 pm »
I have developed an Add-In which produces documentation using Word. To place diagrams into this document I have used the following method from the Repository class

PutDiagramImageOnClipboard

This works just fine, however when the images are placed on the clipboard, they are opened and appear as diagrams.

I have noticed that when using the in-built RTF generator this does not happen. Is there anyway using an Add-In to place a diagram image on the clipboard without it opening ... just like the RFT generator.

In addition, once on the clipboar, a simple Paste in Word does the job, but large diagrams do not scale to fit the page in the word document. Is it possible to scale the diagram to the page size, before copying to the clipboard?

Cheers

108
Hi All

Is there any way to extract the Keywords text (as entered in an Element properties), using the Object Model?

I have searched the UserGuide and can find no such method or property

Cheers

109
Automation Interface, Add-Ins and Tools / Server Busy Dialog
« on: August 20, 2008, 02:02:37 am »
Hi All

I have written an Add-in which launches an external tool from within EA, the add-in then waits for the external tool to finish executing (it behaves therefore like a modal dilaog)

All works just fine, when I close the external tool, a dialog appears in EA titled "Server Busy".

Upon clicking the Retry button on this dialog, everything resumes as normal.

Is there are way to stop this dialog appearing?

Cheers

110
Automation Interface, Add-Ins and Tools / Add-in not registering
« on: August 21, 2008, 12:38:10 am »
Hi All

I have written an Add-in using c# and Visual Studio 2008, the target build is .NET 3.5

All works well under Visual Studio, however when I try to deploy to a client's machine, the registration of the add-in dll fails.

I have followed the details in EA user Guide 7.1 page 1335 section 16.5.1.1.2 which states that the .dll is stored somewhere and then registered using regsvr32, but I receive the following error:

Add-in.ddl was loaded but the DllRegisterServer entry point was not found

The file cannot be registered

I have set the Visual Studio build options to Register for COM interop and the configuration is Active (Debug)

What am I missing or doing wrong?

I always get the error no matter where the .dll is stored.

Cheers

Phil

111
Automation Interface, Add-Ins and Tools / Add In Exception
« on: July 08, 2008, 01:28:54 am »
Hi All

I am developing an addin in C#.Net to produce documentation using MS Word.

I have used the Sparx C# Add-in Framework, and Word launches just fine.

All compiles/builds/installs OK and all my Add-In menus are then upon opening a project.

The Add-in works fine for the first time, however, upon a subsequent invocation I receive a dialogue stating

RPC Server Unvailable

Any ideas?

Cheers

Pages: 1 ... 6 7 [8]