Re: Visio exe add-on how-to?
From: Al Edlund (edlund_at_ameritech.net)
Date: Mon, 31 Jan 2005 10:02:08 -0600
Let's see if I can get these
when you create your event handler you will also create an addadvise routine
to add your event handler pointer to visio so it knows what to forward to
you. You don't want the users to play with persistent events, it is a sure
way to cause problems.
when the sdk installed on my system I got an extra vs.net template for visio
addon that included (I believe) a project for installing the addon. All of
the mechanics were already created for me (or I forgot that I did them).
Understand when you distribute your document with the code as vba, anybody
who wants to use it / change it /copy it, has the source code. It is not an
addon it is VBA....
regarding debugging addons, there has to be several hundred ways to do it.
The key concept is that while you develop your solution, develop your error
handling as well. In vs.net I've learned that whenever there is an
opportunity to fail for whatever reason I wrap my code in Try... Catch... At
a minimum I have it point to an external log to record the errors.
"Josef Meile" <JosefMeile@discussions.microsoft.com> wrote in message
> Hi Al,
>> When you install the v2003 sdk it will give you access to additional
>> Open v2003 (and the template you are creating) go to tools => sdk =>
>> persistent events and then you can manipulate your document and put in
>> calls to your add-in.
> Thanks for your reply. Persistent events was exactly what I was looking
> for; however, when you use this tool, does the user, who is going to
> your add-on, need to install the sdk to use the "Persistent Events Tool"
>> A good example is the flowchart add-on for how to
>> create the calls to event markers and the need for a user field in your
>> template so the code can validate that it is your template.
> Yes, I saw they create a SinkClass to handle the visio events. So, once
> you add load your add-on with a persistent event on your template, will it
> overwrite the visio's default event handler with your own till the
> document is
>> The tree diagram
>> example in the SDK might also be of help in some of your design work.
> Yes, that's where I got the idea to make a tree view for my project.
>> v2003 likes a lot of memory, so users with low memory may see performance
>> issues can be annoying.
> Yes, that's the reason why I want to do this with an add-on. You don't
> have to
> force users with low memory to load it at visio start-up.
>> I suspect you will be writing your add-on in something other than VBA,
>> otherwise it is merely a template with embedded code. For help in
>> platform I'd suggest Graham Widemans book "Visio 2003 Developers Survival
> Yes, I saw that a lot of people recommended it on all the posts I found.
> So, I
> will try to convince my boss to buy it.
> Just some questions:
> 1) Always when I install an add-on, I have to include the path to the
> on the "Visio add-on path". Is there any way to tell the setup of your
> to register your add-on on visio, so that it knows that there is a new
> 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
> of the visio excecutable under the "start application" field of the
> 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
> on visio, in order to debug the add-on?