Space Plan

Started by Naresh Nichani, May 11, 2009, 12:50:13 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Naresh Nichani

Hi,

When the Space Plan add-on is enabled a custom menu I add to the main "Menu Bar" command bar disappears. If this Space Plan is disabled and I reopen my drawing it works.

Questions -
1. Is there a way to detect if a Visio drawing has the Space Plan add on enabled so I can warn users to disable it.
2. Could there be something I do different in my code to prevent my menu from disapearing.

Any tips, pointers appreciated.

Naresh

Visio Guy

Hi Naresh,

Perhaps use the UI object model instead of CommandBars? Visio ui customizability is pretty sophisticated, and CommandBars are kind of dumb, as far as I have seen. They are very global, and not solution-oriented.

There may be a way to get the CommandBars to work properly, but I haven't worked with them for some time.

Anyway, with the UI model, you get a sort of "tree of customized uis":

Visio's default menus and toolbars
Custom menus and toolbars
- Document's default menus and toolbars
- Custom document menus and toolbars

The trick is to add your customizations to the customized document ui (if it exists, ie: if it is customized). That way you'll keep anybody else's customizations.

There is probably a NoEventsPending angle on this as well - don't add anything until everybody else is finished.

I haven't worked with this for awhile, so my off-the-top-of-my-head knowledge is a bit vague. Hope this gives you some direction, anyway.
For articles, tips and free content, see the Visio Guy Website at http://www.visguy.com
Get my Visio Book! Using Microsoft Visio 2010

Naresh Nichani

Chris,

Thanks - that helps. Will check it out.

Naresh