Add to Visio's Built In features/windows (Add-in?)

Started by MacGyver, September 27, 2012, 02:59:09 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

MacGyver

I have created a custom window that displays a variety of information on a shape, including its Name, NameID, and its Master Name.

It updates this info using the _SelectionChanged event for the active window.  This works fine and as intended except when I am debugging a separate macro.  The _SelectionChanged event doesn't fire until I'm finished debugging the separate macro.  However, Visio's built in windows (Shape Data Window, Size & Position Window) do update while in the midst of debugging.  Is there any way to ensure that my window updates just as the built in windows update?

I'm not too familiar with Add-Ins but was unsure if i might be able to create my custom window as an Add-In and that way it runs within the application and doesn't require the separate code to be in the document.

Paul Herber

There's more than one type of addin, ones that run within the Visio application, and those that run outside Visio.
However, it could be that running macros within the VBA debugger overrides all external events, I'm not at a computer with Visio installed at the moment so can't check.
Electronic and Electrical engineering, business and software stencils for Visio -

https://www.paulherber.co.uk/

aledlund

"This works fine and as intended except when I am debugging a separate macro.", are you using VBA? The other add-ins are probably using an AddAdvise (not vba) with Visio handling the interrupt handling.
al

MacGyver

Yes, I am using VBA. 
Looking more into add-ins, I'm thinking i might not be capable of doing what I desire as I do not have Visual Studio and from the little research I've done into Add-Ins, I would need Visual Studio to create an Add-In?

Jumpy

There are free versions of Visiual Studio. VS Express? The each support one language, VB, C#, ..., i used the C# version  in school and could do everything I wanted with it. But I can't tell, if you can publish AddIns with that.

aledlund


Paul Herber

You don't need Visual Studio, there are alternatives. To create certain types of addon all you need is a EXE/DLL of the right structure. Or there are other ways to create C# files e.g. SharpDevelop.
Electronic and Electrical engineering, business and software stencils for Visio -

https://www.paulherber.co.uk/