Can I drop a master shape into a drawing without having to open the stencil?

Started by freshlychurnedbutter, February 11, 2022, 02:08:30 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

freshlychurnedbutter

My current method is point Visio to the file path of the stencil, open up the stencil, drop the master shape into drawing, close stencil. Is there a more direct way where I can just point Visio to the file path and drop the master without having to open the stencil?

Paul Herber

If the shape has already been used in the drawing then there will be a copy in the Document Stencil a.k.a. the Masters.
Electronic and Electrical engineering, business and software stencils for Visio -

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

freshlychurnedbutter

No it's a completely new shape that hasn't been used in the document yet.

Paul Herber

Electronic and Electrical engineering, business and software stencils for Visio -

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

vojo

since document opened, document stencil is available by default....open it and use shapes already in drawing
New shapes would need that new stencil to be open

splitting hairs but not sure why opening any stencil is a problem.

freshlychurnedbutter

Essentially I have multiple stencils of "building block masters". These "building block masters" will be used to create more complex masters depending on the parameters I enter into a VBA script. Let's say the new complex master being created consists of 10 different "building block masters". Right now, I need to open and close stencils 10 times in order to drop the "building block masters" into my current drawing. I was hoping there would be a more direct way of doing this instead of having to open and close stencils.

Nikolay

But how do you want to define what you want to drop, then? I mean, if it is not via stencil, how do you want to define your masters then?
There are methods for drawing "primitives" like "rectangle" or "circle", i.e. page.DrawRectangle of course, but these cover only basic shapes.

Remember, you can create your own stencils, and put the masters you need for your drawing there.
This way, you don't need to pick masters from many stencils, you can just use the one you created.

Paul Herber

How many shapes do you have? Can they all go in one stencil? Can they all be put in the Document stencil before you start?
Electronic and Electrical engineering, business and software stencils for Visio -

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

freshlychurnedbutter

I have different stencils to house different "categories" of "building block masters". The "complex master" that I create via VBA pulls from these different stencils. I have between 5 to 20 "building block masters" in each stencil and 6 stencils in total. It would make things very confusing for my workflow if I were to place all of these "building block masters" into a single stencil. Plus I found that the more masters you place into a stencil, the more lag there is when Visio opens it.

Yacine

There is no need to close the stencil after each dropping. Open all 6 at the beginning and close (if necessary at all) at the end of the whole process.
Yacine

Paul Herber

When you open the stencils (use OpenEx) use the visOpenHidden flag. Open all the stencils and keep them hidden.

Electronic and Electrical engineering, business and software stencils for Visio -

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

freshlychurnedbutter

Yacine, that's a good point. I think I intentionally programmed to close the stencils after each drop because I like to keep a cleaner interface. Rather than having 6 stencils opened. I think I can eliminate the close stencils after each drop and just close them all at once at the end of the script. Thanks for the suggestion!

Paul, I'm gonna look into this. Will let you know if it works! Thank you