Creating custom stencils

Started by MBall, July 07, 2023, 08:13:13 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

MBall

I am having a terrible time creating a custom stencil for a cross functional swimlane. I want to have the title bar across the top filled with a specific color, but the swimlane headers to be different. First I tried dragging the swimlane shape to my page, which gave me the swimlane plus the title bar, as expected. I formatted it how I wanted it and then dragged it over to a new custom stencil group. When it creates the new master shape the icon shows the swimlane plus the title bar, but when I drag it over to start a new map it won't let me add swimlanes. I can't choose that option when I right click, there is no 'insert swimlane shape' arrow that appears when you point to the corner. I tried to drag a swimlane over to the custom stencil group, and the icon looks like a single swimlane, but when I drag it over to add it to an existing crossfunction map, it just create a whole new map with a new title and phase bar. Plus to add insult to injury, it didn't even retain the formatting that I added.

HELP!! This is driving me crazy.

Paul Herber

Cross-functional diagrams are controlled by one of the built-in Visio addins, and the dropping of shapes on the page is one of those events that the addin monitors and takes out of your hands, so it could be ignoring the shape that you drop and using the shape that it wants to use.
Electronic and Electrical engineering, business and software stencils for Visio -

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

Nikolay

#2
It is possible to customize it, but it takes a bit more than drag-drop. You will need to go deeper (to the ShapeSheet).
To make the Visio use YOUR shapes instead of standard shapes, I would suggest you try the following:

1. Copy the original "Cross Functional Flowchart Shapes" stencil ("xfunc_m.vss"), let's name the copy "CustomFlowchart.vssx"
2. For each master (there should be 7 of those) in your new custom stencil (see the screenshot), replace the reference to "xfunc_w.vsd" with a reference to your "CustomFlowchart.vssx"
3. Customize your shapes the way you want.
4. Provide your new "CustomFlowchart.vssx" stencil to your users.


Nikolay

#3
A sample (customized) stencil to illustrate the idea (the forum allows only 2 attachments per post, therefore a separate post)

MBall

Sorry, I am not following. I had copied a number of stencils into a custom group, but I am not sure what mean about renaming a file for the stencil.

Nikolay

Does the above stencil (attached) look like what you want to achieve?

MBall

Yes, that is what I am looking for. I want the title bar to use a specific color associated with a brand for certain projects. On your diagram, when you drag over the customized stencil, are you able to add more swimlanes using the insert swimlane arrow on the corner, or from the Insert menu?

I really appreciate your help on this! I've been using Visio for many years and am downright embarrassed that I haven't figured this out. I created custom stencils for a bunch of other shapes, but this one has me stumped!

MBall

I thought I got it right just now after looking at your instructions again, but now when I pull the swimlane stencil on to the page for the first time, I don't get any title bar at all. The line color I selected for the swimlane changed as I intended, but there isn't a title bar at all.

wapperdude

Minor point of clarification, to avoid confusion, what you're referring to as swimlane stencil, is really swimlane shape.  Stencil is the collection of shapes.  It is a file with either .vss  or .vssx suffix.  This will make it easier to communicate back and forth.
Visio 2019 Pro

wapperdude

@Nikolay:  The shapes do indeed appear to be misbehaving as described.  In addition, Visio does not recognize the shape as a cross-flow shape, so it is not possible to drop a separator shape on it.  I have not delved into this to track down the problem.
Visio 2019 Pro

MBall

Thanks for the clarification. I usually refer to the individual shapes as shapes and the groupings of shapes as stencils. In this case I was able to create custom versions of a lot of shapes and put them into a new stencil. The only one that I can't get to work properly is the cross functional swim lane stuff. I would love to hear any other ideas about how to address this.

wapperdude

#11
 :)

Groups of shapes are well, groups ...unless it's a container. 

I've not worked with cross-functional diagrams.  Quick glance seems that the shapes are essentially containers.  There's also a lot of embedded code in the cross-function template.  That complicates things.  For example, when a swim lane is dropped, the long horizontal banner is added, it is not a member of the swimlane.  At least, that's how it seems to me at 1st glance.  If that's the case, then pre-coloring may be quite difficult.  A potential solution might be via use of themes with the existing supplied shapes.  If so, you could make a custom template to invoke the desired coloring.  ...or not.
Visio 2019 Pro

MBall

Yes, when I was working in the Explorer and going into the shapesheet There is a separate "shape" for the title and it is actually a container. What I am tryin to accomplish seems so straightforward but apparently not.

I did create a theme, but it that didn't work either. It keeps using a different accent color on the swimlane lines than any other shape. It is a color that is included in the theme I created that I wanted to have available to use if I needed it, but there doesn't seem to be a way to control how it is applied. It is also using s line style that is total different from all the other shapes that I definitely didn't choose. Normally when you drag a shape over the outline is a simple line. When I drag the cross functional shapes over it is actually a double line and the width is 2.25. Completely different from every other shape. It isn't a formatting choice I would make deliberately.

Nikolay

#13
@wapperdude do you mean, the shapes from my stencil are misbehaving, or which shapes?

This stencil shapes?
http://visguy.com/vgforum/index.php?action=dlattach;topic=10145.0;attach=11548

1. You create a new diagram (blank new)
2. You open that stencil into it.
3. You drop a "swimlane" shape on the drawing. Here, by me, it gets the "title" and all other stuff that swimlane is supposed to have. Do you mean this is not working for you?

@MBall I have recorded a video, hopefully this should explain what I meant:
https://www.youtube.com/watch?v=t3Tzbw03U24

MBall

the video was really helpful. I think I didn't catch the hidden shapes when I did this. One thing I didn't see in your video was adding additonal swimlanes. Once you have created the first swimlane that includes the title, are you able to hover over the corner of the first swimlane and add an additional swimlane? Is adding swimlanes an option if you right click? That was another issue I had. Once I created the custom stencil, I couldn't add more swimlanes.