master shape in stencil versus document stencil


    Sponsored Links


  • 1. Connection-maker macro?
    lets say you have a layer with 20 objects in it and you want to connect them in an N:N fashion (20, objs, that makes 190 connections, duh...). A) Can you think of a code to do this? I doubt this is achievable via a single it? B)I've been thinking of a variation for a macro - first you select some of those objects then run a macro which does like - go to this layer, take what is selected there and make them connected. But now when I think about it, approaches A and B are not that diffferent...:-D Can anybody help?
  • 2. Create a connector in a new layer?
    How do I (programatically) create a connector in a new layer? When you create a connect object it goes to the Connector layer by default ( I suppose). I want to change this behaviour and make it to appear in a new layer. I'm thinking of a scenario - create a connector (it goes to the Connector layer), create a new layer, move the connector form the Connector layer to this new layer. Is there another way? Also - what is the correct code for creating new layers? What parameters do I have to set for it to be accepted by the rest of the system?
  • 3. Problems setting up Shape Studio
    Hello, I have not been able to get Shape Studio to work. I have read "Readme ShapeStudio.htm" I am working on a Vista Ulitimate machine. I have installed: Visio 2007, the Visio 2007 SDK, SQL Express 2005. I then created a system DSN (SysShapeStudioDsn) to the default instance of SQLEXPRESS and launched the SSAdmin utility. It had the following settings: Database Name: ShapeStudio Database Location: C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\Data Data Source Name: SysShapeStudioDsn Though the readme explicitly states "The ShapeStudio Database Administration tool creates an MSDE database running on the user computer," I thought I'd give it a shot on the SQLExpress DB. It did not work. It "can't connect to MS SQL Server". Then I figured I would just create the database myself through MS SQL Server Management Studio Express. Did so and then opened the SStudio.sql file and executed it against the ShapeStudio database. Next I launched Visio 2007 and clicked Shape Studio.. Clicked Add (next to data source) and it crashes Visio. Can anyone help? Thanks, Gary
  • 4. Is this a Group?
    How do I detect whether my ActiveWindow.Selection is a Group? What comes to my mind is checking whether the Item collection's Count property is > 1. Is this legal and a sufficient test?
  • 5. Auto re-layout shapes
    Is there a way to control the layout of the Visio diagram without manually using the e-layout shapesfunction and without being forced to set the X- and Y coordinates of every element when creating the Visio XML file outside the application. Im not using any automation, but create the Visio XML file with XML DOM and then opens it in Visio.

master shape in stencil versus document stencil

Postby S2F0aSBNb2xuYXI » Sat, 09 Apr 2005 04:01:04 GMT

A drawing should refer to the stencil for its shapes so that the shapes can 
be kept and updated only in one place. When the master shape in the stencil 
is updated, the shapes in all the drawings derived from the master shape in 
the stencil should also change. However, this is not the case.

A master shape is copied over to the document stencil when it is dropped on 
the drawing. The document stencil behaves as the original stencil should from 
this point. When a master shape is changing in the document stencil, the 
change is getting propagated to all the shapes in the drawing. But when the 
master shape in the original stencil changes, nothing happens. The connection 
between the master shape in the original stencil and the derived shape is 

The document stencil belongs to one document only. So the concept of having 
a stencil and getting the changes only in one copy is broken. If we need to 
change every document stencil individually to get the change in the original 
master shape then we do not have a real stencil concept.

Which is a pity.

Kati Molnar

Re: master shape in stencil versus document stencil

Postby Chris Roth [ Visio MVP ] » Sat, 09 Apr 2005 04:53:12 GMT

You are correct.

When Visio was first created, people were barely using the network.

I think Visimation has attempted a Shape Replacement tool.


Hope this helps,

Chris Roth
Visio MVP

Similar Threads:

1.How to update document stencil master from stencil

I am developing a stencil with shapes for our PI diagrams and of course I am 
getting wishes from my colleagues.

Is there a way to update the diagrams my colleagues created with the 
modified shapes I created in the stencil?
I would hate to have to modify the masters of the document stencil in 
several diagrams.

We are using Visio 2003 Pro.

2.Apply master stencil formats to selected shapes in document

I have a work flow that predates the creation of my master stencils.  I want 
to apply the formating of my newer stencil masters to older selected shapes 
in the document.  I assume the document shapes are currently linked to the 
document stencil (similiar shapes with totally different formatting including 
different shape data)  Can I reassign these links or achieve my goal in some 
other way?

3.Remove extra shapes from Master Document Stencil

When you drop a shape from the Visio stencils onto a page, a copy of that 
master is added to the Document Stencil.  When the shape is deleted from a 
page it is not removed from the Document Stencil.  By cleaning out the 
Document Stencil of unused Master Shapes you can decrease the size of your 
saved drawing files.

I have included the VBA code from a macro that I created to clean up unused 
shapes from the Document Stencil.

    ' Loop through each master then check across pages to see if it is used
    index = vsoDocument.Masters.count
    While index > 0
        bMasterUsed = False
        Set oMaster = vsoDocument.Masters.Item(index)
        For Each oPage In vsoDocument.Pages
            For Each oShape In oPage.Shapes
                If oMaster.Name = oShape.Name Then
                    bMasterUsed = True
                End If
        ' if Not used delete it from the document stencil
        If bMasterUsed = False Then
        End If
        index = index - 1

4.Deselecting Masters in the Document Stencil

Hi all,

I have been creating stencils using the 
Application.ActiveDocument.Masters.Add method in VB6, and 
have noticed that it selects the master on creation.
Problem is though, I haven't found a way to deselect 
programatically, and if a master is selected before I 
create it, then they are both selected (same as shift-
click though the UI).

I am trying to make sure the user doesn't accidentally 
drop several shapes at once, especially considering that 
they may be hidden, and they wouldn't know if several were 


5.How to hide master on Document Stencil?

Using Visio ActiveX control in C# winforms application, there are shapes the 
user can see and shapes hidden from view on a particular page.  The page is 
loaded in from a template when the application begins.  Also, an app specific 
stencil is also opened called Plan.vss.  

Some shapes built from Plan already exist on the "blank" template page but 
on a hidden, as yet unconnected, layer.

Now, as the user adds new visible shapes to the page, the app connects and 
adorns user shapes with hidden connectors and shapes.  The app takes masters 
from Plan and drops them on the page to make the connections and create a 
"flow".  The side effect of this is that hidden shapes now appear on the 
Document Stencil.  At this stage and for these users, I'd rather not expose 
those masters of hidden shapes on the Document Stencil.

1) Is there a way to hide those masters on the Document Stencil?  

2) Or, as I'm mulling over here, should I simply put all possible hidden 
shapes on the template page and simply copy them as needed into the connected 
user flow.  Possibly this would bypass the automatic drop on the Document 
Stencil because the app wouldn't be dropping from Plan onto the user's page.  
In other words, don't use Drop to add hidden shapes??

6. changing master on document stencil with automation

7. Visio 2003 - Org Chart from Excel Ignores Modified Masters in Document Stencil

8. Master on Document Stencil

Return to VISIO


Who is online

Users browsing this forum: No registered users and 94 guest