Disabling a Master in Stencil window 
Author Message
 Disabling a Master in Stencil window

Is there a way to disable a master in the stencil window?  I know
about the Hidden property but I think it's a read only property
because when I try to set it to true to one of the masters it gives me
an automation error.  Here's how I tried to do it.

Set MyStencil = visApp.Documents.OpenEx("MyStencil.vss",
visOpenDocked)
Set visMaster = MyStencil.Masters(1)
visMaster.Hidden = -1

and I get this error:
Method 'Hidden' of object 'IVMaster' failed.

Any explanation on this would be a big help!  Thanks in advance!

Vish



Fri, 02 Apr 2004 22:46:35 GMT  
 Disabling a Master in Stencil window
Thank you for the hint. Some days ago I searched
this feature.
It seems to work when you open the stencil window
not in Docked Mode (i.e. a new window), or if you
click right on the  title of the docked window and select
Edit before you set the master's hidden property.
Does anybody know how this right click on edit
is done in VB? I cannot find any respective property
in the document or window class.

Thanx
  Stefan



Quote:
> Is there a way to disable a master in the stencil window?  I know
> about the Hidden property but I think it's a read only property
> because when I try to set it to true to one of the masters it gives me
> an automation error.  Here's how I tried to do it.

> Set MyStencil = visApp.Documents.OpenEx("MyStencil.vss",
> visOpenDocked)
> Set visMaster = MyStencil.Masters(1)
> visMaster.Hidden = -1

> and I get this error:
> Method 'Hidden' of object 'IVMaster' failed.

> Any explanation on this would be a big help!  Thanks in advance!

> Vish



Fri, 02 Apr 2004 23:48:58 GMT  
 Disabling a Master in Stencil window
Stefan:

The right-click Edit actually closes the stencil and reopens in
read/write. So basically from VB you'd want to open the stencil R/W.

Graham

Quote:

> Thank you for the hint. Some days ago I searched
> this feature.
> It seems to work when you open the stencil window
> not in Docked Mode (i.e. a new window), or if you
> click right on the  title of the docked window and select
> Edit before you set the master's hidden property.
> Does anybody know how this right click on edit
> is done in VB? I cannot find any respective property
> in the document or window class.

> Thanx
>   Stefan



> > Is there a way to disable a master in the stencil window?  I know
> > about the Hidden property but I think it's a read only property
> > because when I try to set it to true to one of the masters it gives me
> > an automation error.  Here's how I tried to do it.

> > Set MyStencil = visApp.Documents.OpenEx("MyStencil.vss",
> > visOpenDocked)
> > Set visMaster = MyStencil.Masters(1)
> > visMaster.Hidden = -1

> > and I get this error:
> > Method 'Hidden' of object 'IVMaster' failed.

> > Any explanation on this would be a big help!  Thanks in advance!

> > Vish

--
--------------------------------------------
Graham Wideman
MS MVP for Visio
Books:
Visio 2000 Developer's Survival Guide
Visio 2002 Developer's Survival Pack (with Tools)
... and resources for programmable diagramming at:
http://www.diagramantics.com
--------------------------------------------
Unoffical Visio FAQ:
http://www.diagramantics.com/diagenvs/visio/faq/index.htm

(Remove the obvious to email me)
---------------------------------------------


Tue, 13 Apr 2004 07:07:29 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. Document/Stencil Objects/masters

2. Visio masters appearance on stencil

3. Getting Master from Closed Stencil

4. Deleting Masters in Document Stencil

5. Getting the selected master from Stencil?

6. Standalone Stencil and Document Stencil

7. Can I update master shapes in Document Stencil from another stencil?

8. Vba code in stencils problem( duplicate stencils)

9. working with stencil window in visio

10. Active Stencil window?

11. SelectionChanged from stencil window

12. Docking a New Stencil Window

 

 
Powered by phpBB® Forum Software