News:

BB code in posts seems to be working again!
I haven't turned on every single tag, so please let me know if there are any that are used/needed but not activated.

Main Menu

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.

wapperdude

@Nikolay: 
Quote3. 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?
dr

Yes.  That is what I mean.  I opened a new X-Func drawing.  Used "More Shapes" to add your stencil.  Dragged horizontal swimlane onto the drawing page and there was only the left edge header and blank swimlane.  The built-in shapes worked fine. 

Out of curiosity, I did a fresh re-start just using the built-in shapes. Opened the DEW, then did drag n drop.  There is a lot that goes on behind the scenes.  The embedded code adds a lot of supplemental shapes.  Since the horizontal banner is added in and not part of the dragged shape (from what I could tell), repeatable performance seems unlikely...at least, not obvious to me. 
Visio 2019 Pro

Nikolay

#16
@MBall: Yes, the menus and all other operations were functional in my case.
The thing is, the cross-flowchart shapes were designed to work with the built-in Visio solution, and were not designed to be user-customizable.
So I would say this approach with changing stencil name in shapesheet is more of a workaround to overcome that.
It is not an official or officially recommended way to do it like this.



@wapperdude Not sure what happened. Maybe a different Visio version? Or maybe file location (could you try placing the stencil file in "My Documents" folder or "My Shapes")?

wapperdude

#17
@Nikolay:  moved to MyShapes=>same as before.

I took built-in shape, changed title bar color, saved to new stencil.  Dragged onto drawing page.  Keeps the color change, but none of the other performance features. 

Edit Update:
Replicated your steps in the  video.  Still getting the same results.  Looked at the Master for CFF Container, and it seems right.
Visio 2019 Pro

Nikolay

@wapperdude well I have no explanation for this behavior. It works for me, checked with Visio Plan 2 and Visio 2019 Pro.

wapperdude

OK.  I'm using V2019 Pro, 64B on Win 11.

I spent some time trying to find something, but nothing jumps out.
Visio 2019 Pro

Yacine

There's the possibility that the OP changed something else than Nikolay and Wapperdude.
An upload of his modified files would help.
Yacine

wapperdude

@Yacine:  actually, this doesn't work for me,...not Minolta stencil, not mind replicating Kiko mat'l steps in his video.  It's like the embedded code is not getting the drop condition to add the horizontal title banner. 

What did work is editing the Doc stencil master.  But, that, of course, is only a local solution.

Very strange.  It obviously works for Nikolay.  This is a case where he's the special one.  Have you or anyone else tried it?
Visio 2019 Pro

Yacine

Well, time lines are only interesting when you really need them, so no I haven't tested.
Yacine

MBall

Nikolay - I almost got it to work. But now when I pull the swimlane shape over for the first time, the container with title is gone. I re-watched your video several times, but the image was a little blurry so I am not sure if I changed the wrong field or somehow turned off the container or disconnected it from the swimlane.

MBall

I didn't download your stencil the first time. I just watched the video. Just now I downloaded your actual stencil file and it worked (sort of, more on that in a minute) but I noticed something that I didn't see on your video. When you copied the original Cross Functional stencil and renamed it, that name you chose appeared as the stencil name on the left in the list of all the stencils, which is what I would expect. However when I opened your stencil in a new file, the name on the stencil is actually Cross-functional Flowchart Shapes, but it contains the custom shapes you created on your video. What is really interesting is that I can go to More Shapes>Flowchart>Cross-Functional Flowchart Shapes and it opens the original stencil (not customized) I am including 2 screen shots. One with just your custom stencil and what the shapes look like and the other that adds original stencil and the shapes it creates.

I clicked on edit to go in and look at all the Masters and the file name you created (CustomFlowChart.vssx) is what has been entered in the User.visMasterStencil on all the masters. I am not sure why the name changed. If I ever fget this working on my own and that happens to me as well then I hope I can figure out how to change the name of the custom version to differentiate it.

The issue that I had with the stencil I downloaded, is that when I tried to go into the master and change the formatting, it worked on the title container and the first swimlane, but then when I added another swimlane, it had the formatting you created with the yellow header on the swimlane. Not sure what is going on with that but I am going to keep working on it.


Nikolay

#25
The formatting may be defined by the selected visio design theme.

I mean, in the example stencil attached I just picked a fixed color, but the original shape is using theme color actually, so when you choose another design, it will change it's title color, and also swimlane color.
BTW, maybe this could be good enough for you? Did you know you can change the colors/styles by just picking another theme on the "Design" tab?
So you could pre-select some that fits you better and provide a template (*.vstx file) to your users to start from that instead of the stencil.



Regarding the name - The file name and stencil display name (shown on the stencil header) may be different. I most probably did not update that one from the original to the "CustomFlowchart" in the attached file.
We are interested in the file name, so the file name should be used in the shapesheet. The display name can be changed in the stencil's properties:


MBall

I did try creating a custom theme, unfortunately you can't control which accent colors are applied. Creating the theme did allow me to make the branded colors available to use, but I wanted to change just the title bar fill color and then the line color for the swimlanes, but not the headers for each swimlane. Themes didn't allow me to control where the different accent colors were applied. It filled the title bar, phase bar and swimlane headers and used the wrong accent color. There isn't a way to control that. I was just hoping to create a template and stencils that used the branded colors, but not too much of them because too much color is distracting.

Thanks for your help!

Nikolay

Hm so did it eventually work for you or not?  ???

Do I understand correctly that this is the issue:
QuoteThe issue that I had with the stencil I downloaded, is that when I tried to go into the master and change the formatting, it worked on the title container and the first swimlane, but then when I added another swimlane, it had the formatting you created with the yellow header on the swimlane. Not sure what is going on with that but I am going to keep working on it.

The swimlane is taken from the stencil, so it should have the header color that is defined in the stencil. Isn't it expected?

Browser ID: smf (possibly_robot)
Templates: 4: index (default), Display (default), GenericControls (default), GenericControls (default).
Sub templates: 6: init, html_above, body_above, main, body_below, html_below.
Language files: 4: index+Modifications.english (default), Post.english (default), Editor.english (default), Drafts.english (default).
Style sheets: 4: index.css, attachments.css, jquery.sceditor.css, responsive.css.
Hooks called: 369 (show)
Files included: 34 - 1306KB. (show)
Memory used: 1221KB.
Tokens: post-login.
Cache hits: 13: 0.00255s for 26,740 bytes (show)
Cache misses: 3: (show)
Queries used: 16.

[Show Queries]