|
|
|
date: Tue, 1 Jul 2008 16:28:19 +0300,
group: microsoft.public.visio.developer
back
My add-in menu problem
Hi all,
I have strange my add-in menu problem when it dissapears under some
circumstances in Visio 2007. The problem can be illustrated using "WBS
TreeView" add-in example from Visio SDK:
1. Initial Visio 2007 menu has a following list of top menu items: "File,
Edit, View, Insert, Format, Tools, Data, Shape, Window, Help",
2. After "WBS TreeView" is activated and some MS Project data file is loaded
in Visio, menu is extended with "TreeView Sample", like: "File, Edit, View,
Insert, Format, Tools, Data, Shape, TreeView Sample, Window, Help",
3. However, when new database document is created ("File / New / Software
and Database / Database model diagram"), new menu item "Database" is
created, but "WBS TreeView" menu is removed from Visio 2007: "File, Edit,
View, Insert, Format, Tools, Data, Database, Shape, Window, Help".
There is no way to restore "TreeView Sample" whatever I do. How "WBS
TreeView" sample code can be extended to have its menu permanent in Visio
2007?
Thanks in advance,
BBD
date: Tue, 1 Jul 2008 16:28:19 +0300
author: BBD
Re: My add-in menu problem
If you check out the sample code, I would suspect that it tests to see if
the correct document has been loaded before it initializes the menu. You
might try removing the test.
al
"BBD" wrote in message
news:eprtW532IHA.4484@TK2MSFTNGP02.phx.gbl...
> Hi all,
>
> I have strange my add-in menu problem when it dissapears under some
> circumstances in Visio 2007. The problem can be illustrated using "WBS
> TreeView" add-in example from Visio SDK:
>
> 1. Initial Visio 2007 menu has a following list of top menu items: "File,
> Edit, View, Insert, Format, Tools, Data, Shape, Window, Help",
>
> 2. After "WBS TreeView" is activated and some MS Project data file is
> loaded in Visio, menu is extended with "TreeView Sample", like: "File,
> Edit, View, Insert, Format, Tools, Data, Shape, TreeView Sample, Window,
> Help",
>
> 3. However, when new database document is created ("File / New / Software
> and Database / Database model diagram"), new menu item "Database" is
> created, but "WBS TreeView" menu is removed from Visio 2007: "File, Edit,
> View, Insert, Format, Tools, Data, Database, Shape, Window, Help".
>
> There is no way to restore "TreeView Sample" whatever I do. How "WBS
> TreeView" sample code can be extended to have its menu permanent in Visio
> 2007?
>
> Thanks in advance,
> BBD
>
>
date: Tue, 1 Jul 2008 10:27:04 -0500
author: AlEdlund
Re: My add-in menu problem
Hi Al,
Thank you.
No, WBS does not test the document before it creates the menu entry. It
simply creates new item "TreeView Sample".
I would suspect that new database diagram clears all Visio top menu items
what does not have BuiltIn property set to "true". All built-in Visio menu
items ("File", "Edit", etc) has such member set to "true", while all custom
menu items, created by some add-in, does not. How can I set my add-in menu
popup to "built-in" programmatically to avoid the removal? Any other ideas?
BBD
"AlEdlund" wrote in message
news:6C6D8BAF-3A6D-488B-A139-97BD36E40557@microsoft.com...
> If you check out the sample code, I would suspect that it tests to see if
> the correct document has been loaded before it initializes the menu. You
> might try removing the test.
> al
>
> "BBD" wrote in message
> news:eprtW532IHA.4484@TK2MSFTNGP02.phx.gbl...
>> Hi all,
>>
>> I have strange my add-in menu problem when it dissapears under some
>> circumstances in Visio 2007. The problem can be illustrated using "WBS
>> TreeView" add-in example from Visio SDK:
>>
>> 1. Initial Visio 2007 menu has a following list of top menu items: "File,
>> Edit, View, Insert, Format, Tools, Data, Shape, Window, Help",
>>
>> 2. After "WBS TreeView" is activated and some MS Project data file is
>> loaded in Visio, menu is extended with "TreeView Sample", like: "File,
>> Edit, View, Insert, Format, Tools, Data, Shape, TreeView Sample, Window,
>> Help",
>>
>> 3. However, when new database document is created ("File / New / Software
>> and Database / Database model diagram"), new menu item "Database" is
>> created, but "WBS TreeView" menu is removed from Visio 2007: "File, Edit,
>> View, Insert, Format, Tools, Data, Database, Shape, Window, Help".
>>
>> There is no way to restore "TreeView Sample" whatever I do. How "WBS
>> TreeView" sample code can be extended to have its menu permanent in Visio
>> 2007?
>>
>> Thanks in advance,
>> BBD
>>
>>
>
date: Tue, 1 Jul 2008 19:33:15 +0300
author: BBD
Re: My add-in menu problem
The Database Modelling AddOn does remove other menus, because it assumes
that you don't need them.
Visio UI has two alternative class hierarchies - UIObjects (pre Microsoft -
used by the Database Model diagram probably) and OfficeCommandBar (post
Microsoft - used by WBS TreeView), and in my experience, they are not always
compatible.
My WBS Modeler was an enhancement of the WBS TreeView sample, and it suffers
the same problem of losing its menu when the Database Model diagram is
opened. I'll need to investigate, but I 'm sure that you cannot change them
to "built-in"
The next version of Visio will have the Fluent UI, thus the future of the
older UIObjects must be uncertain.
"BBD" wrote in message
news:%23kQTsg52IHA.1428@TK2MSFTNGP06.phx.gbl...
> Hi Al,
>
> Thank you.
>
> No, WBS does not test the document before it creates the menu entry. It
> simply creates new item "TreeView Sample".
>
> I would suspect that new database diagram clears all Visio top menu items
> what does not have BuiltIn property set to "true". All built-in Visio menu
> items ("File", "Edit", etc) has such member set to "true", while all
> custom menu items, created by some add-in, does not. How can I set my
> add-in menu popup to "built-in" programmatically to avoid the removal? Any
> other ideas?
>
> BBD
>
> "AlEdlund" wrote in message
> news:6C6D8BAF-3A6D-488B-A139-97BD36E40557@microsoft.com...
>> If you check out the sample code, I would suspect that it tests to see if
>> the correct document has been loaded before it initializes the menu. You
>> might try removing the test.
>> al
>>
>> "BBD" wrote in message
>> news:eprtW532IHA.4484@TK2MSFTNGP02.phx.gbl...
>>> Hi all,
>>>
>>> I have strange my add-in menu problem when it dissapears under some
>>> circumstances in Visio 2007. The problem can be illustrated using "WBS
>>> TreeView" add-in example from Visio SDK:
>>>
>>> 1. Initial Visio 2007 menu has a following list of top menu items:
>>> "File, Edit, View, Insert, Format, Tools, Data, Shape, Window, Help",
>>>
>>> 2. After "WBS TreeView" is activated and some MS Project data file is
>>> loaded in Visio, menu is extended with "TreeView Sample", like: "File,
>>> Edit, View, Insert, Format, Tools, Data, Shape, TreeView Sample, Window,
>>> Help",
>>>
>>> 3. However, when new database document is created ("File / New /
>>> Software and Database / Database model diagram"), new menu item
>>> "Database" is created, but "WBS TreeView" menu is removed from Visio
>>> 2007: "File, Edit, View, Insert, Format, Tools, Data, Database, Shape,
>>> Window, Help".
>>>
>>> There is no way to restore "TreeView Sample" whatever I do. How "WBS
>>> TreeView" sample code can be extended to have its menu permanent in
>>> Visio 2007?
>>>
>>> Thanks in advance,
>>> BBD
>>>
>>>
>>
>
>
--
David Parker
Microsoft MVP (Visio)
http://bvisual.spaces.live.com
http://www.visualizinginformation.com
date: Wed, 2 Jul 2008 07:43:07 +0100
author: David Parker
|
|