Re: Visio exe add-on how-to?

Tech-Archive recommends: Fix windows errors by optimizing your registry

From: Josef Meile (JosefMeile_at_discussions.microsoft.com)
Date: 01/31/05


Date: Mon, 31 Jan 2005 12:15:01 -0800


> 2) What's the correct way to debug an exe add-on from C#? I created a new
> add-on with the "Visio add-in or add-on" template, then I tried to copy the
> path
> of the visio excecutable under the "start application" field of the Debugging
> settings of my project, it doesn't allow me to do that. The field is
> disabled, so,
> how can I activate it? After activating it, do I have to set up something
> additional
> on visio, in order to debug the add-on?
Ok, I found the solution to this one. For the interested here are the steps:

1) Choose the "Debugging" tab of your project properties.
2) On "Debug Mode" select "Programm"

I had done always those two steps, but I forgot:

3) Click on the button "Apply". If you don't do this, the "Start Application"
field won't become active -> according to the post I found, this seems to
be a bug on visual studio net.

4) Now you can write the path to the visio executable on that field.

I got debugging working together with visio. I put two breakpoints on the
the FlowChart add-in for C#: one on the "OnConnection" method of the
add-in and other on the "VisEventProc" of the "EventSink" class. The
first one is hit as soon as visio is started. Then I see how the marker
events are added to visio and associated to an instance of the EventSink
class. However, when I create a document based on the add-in template,
the second breakpoint is never hit and as I said on my original post, I
only see a blank template with the following message:

"This template is designed to work with the Flowchart Sample Application
that must be built by compiling sample code located in the SDK install
directory under samples\flowchart\csharp."

and nothing else happens. So, visio isn't calling the VisEventProc of the
add-in. I will try to do a small example to see if I get it working.

Thanks anyway for your help.
Josef


Quantcast