A short tutorial showing how to create layers in a Visio diagram and how to embed checkboxes to control the visibility of those layers.
Пікірлер: 41
@PuppiesPuppies3 жыл бұрын
It’s as if Timothy Dalton (James Bond) were teaching Visio! Nice work sir!
@harshadjadhav328210 ай бұрын
Loved it. Made my day. Thanks 🙂
@andystokes82224 жыл бұрын
Great tutorial - very useful for complex network diagrams!
@BrowsingPass2 жыл бұрын
Owe you a big thank you!
@freezerlunik4 жыл бұрын
Very well done! Thank you for this concise and action-packed tutorial!
@AndrewWest135 жыл бұрын
Easy to follow, gets the job done. Looking forward to more as this was a much simpler approach then a previous button type approach I used. Thank you.
@lorenzofabbri4402 жыл бұрын
Thanks a lot, done and working really well 👍
@bobbycalabrese8315 жыл бұрын
Great Training Video! Well Planned out, good voice. Thanks for sharing
@yannicky25885 жыл бұрын
Great video, Great spirit! Thank you very much.
@MsBettyRubble6 жыл бұрын
So helpful, and just what I needed! Thanks for sharing this. I've created a complicated network diagram. This is perfect for isolating how data moves through the system.
@JPL2thousand95 жыл бұрын
Same here. I'm needing to separate backhaul on my network map without having to jump back and forth between different maps. Would like an easier solution but this will definitely help.
@jizengjin40215 жыл бұрын
That was very helpful. Thank you!
@AbhishekChauhan-ux8gg4 жыл бұрын
Thank You, save my day !
@10mins4 жыл бұрын
I'm glad I could help.
@COii31536 жыл бұрын
Appreciate your time sharing this +1
@jenswachholz8279 Жыл бұрын
Very good - thank you. Do you have a short demo with radio buttons too? How to group them and to get the status back?
@10mins Жыл бұрын
Jens. Sorry but I do not have anything on radio buttons. My Visio videos were created several years ago. I have since retired and have not touched Visio since then, so I'm afraid there's nothing new in the pipeline.
@MrBarnabyArnott4 жыл бұрын
Just what I was looking for! :) Let me suggest some improvements to fill the gaps you admitted to: Just pass the Checkbox's 'Value' property to avoid the If statement And if you set the Caption to match the layer's name, you can just pass that. Substitute "##" below with your layer name. (If you don't like this, maybe look at using the Data1 or GroupName properties of the Checkbox to populate the related layer's name) Private Sub ToggleLayer_##_Click() Call LayerToggle(ToggleLayer_##.Caption, ToggleLayer_##.Value) End Sub Sub LayerToggle(LayerName As String, Checked As String) ' Used by checkboxes to toggle visible layers 'Enable diagram services Dim DiagramServices As Integer DiagramServices = ActiveDocument.DiagramServicesEnabled ActiveDocument.DiagramServicesEnabled = visServiceVersion140 + visServiceVersion150 Dim UndoScopeID1 As Long UndoScopeID1 = Application.BeginUndoScope("Layer Properties") Dim vsoLayerToToggle As Visio.Layer Set vsoLayerToToggle = Application.ActiveWindow.Page.Layers.Item(LayerName) vsoLayerToToggle.CellsC(visLayerVisible).FormulaU = Checked Application.EndUndoScope UndoScopeID1, True 'Restore diagram services ActiveDocument.DiagramServicesEnabled = DiagramServices End Sub
@10mins4 жыл бұрын
Thank you for your input Barnaby. That's very helpful. I appreciate you taking the time to spell it out.
@sdolo2223 жыл бұрын
Doesn't really work for me, it says runtime error. .Item() seems to only read integers. Would be cool to get your code working though but I'll stick to the original code in the vid for now. Thank you both so much and appreciate any further help :) **UPDATE**: I managed to fix my issue, the caption wasn't the same, now it works!
@jmorton1287 жыл бұрын
This was awesome. I had to tweak mine by adding a .Value before the Then statement. One thing though, I've created a second tab called 'option 2' this tab has some of the same objects and flows as my first tab 'option 1' I'm trying to create another macro to use some of the same 'check boxes' but can't seem to create another macro. I tried using the same macro and Visio Objects (Private Sub) and just add my new IF statements to the new flows but that doesn't seem to work. Any chance you could point me to some documentation on doing what you did in this video but across multiple tabs? Or say adding a 3rd shape but on a different tab and adding an additional check box on tab 2? Either way, this was grrreat! Thanks!!
@10mins7 жыл бұрын
Thanks for watching, and for leaving a comment. I'm glad you found it useful. I hadn't thought about trying to do it across multiple layers, but now you've planted that idea I will play around and see what I can come up with. Stay tuned, but don't hold your breath because it might be a while before I can get around to it.
@vorapobautomation97604 ай бұрын
How to display the object or shape name in text by just only click at the shape ?
@RhythMickJ4 жыл бұрын
The layer can be accessed by name for example ... Set vsoLayer = ActivePage.Layers.Item("LayerName")
@10mins4 жыл бұрын
Thanks for that Mick. Good to know. I assumed there must be a way, but as I said in the video, I'm just feeling my way around. I'm definitely not a VBA coder.
@matrout615 жыл бұрын
I found that the layers changes the box fill color and text to the layer color assigned. Is there a way to have it only change the fill color but keep the text black?
@10mins5 жыл бұрын
Mark, you should be able to add code to set the color of the text. If, like me, you're not a VBA coder, then you could use the same technique I used to figure out what the code looks like. Create a macro and use Visio to change the text color, and then go into the macro editor to examine your code. In principal you should be able to change any of the properties of the object in the module when you toggle a layer on or off.
@cdallen64836 жыл бұрын
Is there a limit on the number of instances in which you can do this? I've had success replicating your techniques to apply 6 different layers onto 2 different pages within Visio 2016. However, once I apply them to a third or fourth page(tab), the entire process ceases to be applicable. The coding appears to be the same from page 2 to page 3, but it's just like the formula just doesn't work anymore. Scratching my head here. Any thoughts on the matter that you could possibly assist me with? Anyone?
@10mins6 жыл бұрын
I've never tried doing it on multiple pages, so I'm afraid I don't have a ready answer. About a year ago, another viewer (J Morton) reported a similar problem. I intended to investigate further, but never got around to it. (My schedule has been rather full for a long while.) Perhaps someone else has an answer???
@cdallen64836 жыл бұрын
After playing around with it a bit further, I was able to find a work around. Visio 2016 has enough bugs as it is already, but I proceeded under the notion that the macros themselves may have had a limit to the number of shapes utilizing their individual coding. I ended up creating multiple macros to accommodate the many shapes and layers as opposed to simply relying on just the one. Seems to work well at this point.
@10mins6 жыл бұрын
Interesting. I've never stress tested any of the macros I've built, so I wasn't aware of this limitation. Thanks for sharing your findings.
@mc_fat_ed542 Жыл бұрын
I want to do this in Actions, can you assist with that?
@10mins Жыл бұрын
I afraid I can't help, I'm not even sure what you mean by Actions. I created this video several years ago when I was still working regularly with Visio. I've been retired for a while, and I haven't touched it since then, so I'm rather out of touch now.
@londonengland23093 жыл бұрын
How is this going to help if you have 200 layers? All these lines of coding?
@10mins3 жыл бұрын
I'm sorry but I can't tell if your post is intended to be a genuine question or a criticism. In either case, I agree with you that it would be a pain to do it this way for a large number of layers. If it's a question, then I would add, "I do say somewhere in the video that I'm not a VBA programmer. I'm just a guy who found a way to do something neat and wanted to share it. If it doesn't work for you, that's a pity, but judging by some of the comments I've received, other people have found it useful, therefore I feel it was worthwhile publishing it. If it's a criticism... Fair point. Constructive criticism is always welcome. How would you suggest it should be done?
@tmanoharanify3 жыл бұрын
thank you for the video. I am getting run time error, i follow all your steps. any advise?
@10mins3 жыл бұрын
If you look in the comments below, about 1 year ago Barnaby Arnott posted some suggestions for improvements. You might try incorporating his suggestions. In the replies to Barnaby's post, Saber Dokmak posted that he was experiencing a run time error, but he later updated to say the problem was "the caption wasn't the same".
@tmanoharanify2 жыл бұрын
@@10mins thank you I just tried again using your instructions and it worked for me! I may have done something wrong last time :). Thank you!!!
@10mins2 жыл бұрын
@@tmanoharanify I'm pleased to hear you resolved your problem.
@donnyyeo5 жыл бұрын
Audio is too low. Normalize the audio first before uploading to KZfaq.
@10mins5 жыл бұрын
That's strange because it comes across loud and clear when I play it back. Tried it on the laptop on which I created it, a different laptop, and on my phone. All sounds good to me.