Functional Collapsible tree with Visio Stencils or collapsible chart

Started by PF4VisioGuy, January 31, 2016, 01:55:43 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

PF4VisioGuy

Hi guys

I am looking at creating something similar with a collapsible tree line the one that Windows exlorer uses to show the files, folders etc
What are my options? VBA coding?

Yacine

Hi PF,
Two topics handle at least partially your problem.

The first is a very old one, where I tried to hide/show parts of a chart: http://visguy.com/vgforum/index.php?topic=1589.0;nowap

The second one is more recent and can be used as generic tool: http://visguy.com/vgforum/index.php?topic=6914.msg28863#msg28863

A first attempt of a script could look like:
IF pinX exists THEN
prop.show:=[P]!prop.collapse;
Height:=prop.show*5mm;
PinY:=[PrSel]!pinY-[PrSel]!height;
PinX:=[P]!pinX+5mm;
width:=prop.show*25mm;
hidetext:=(height=0);
ENDIF

It's not perfect yet, as I could not get around the correct logic of a tree. (The child shapes don't collapse as they should).
But I'm sure you can solve this problem - as it would need to be solved regardless the solution chosen.
HTH,Y.
Yacine

PF4VisioGuy

Thanks a lot
I will take a look.
I am looking for something that will allow me to show/hide options for command lines.
The tree paradigm what the closest thing that I could think of.

wapperdude

I would think you could use the code from this post, http://visguy.com/vgforum/index.php?topic=6373.msg26266#msg26266 , as a starting basis.  It will need modifying.  But, you could select a shape, run the macro, use out going shapes, and hide them instead of coloring them.  At least, it'll give you an idea how to proceed.

Wapperdude
Visio 2019 Pro

Yacine

Quote from: PF4VisioGuy on February 01, 2016, 02:16:15 PM
I am looking for something that will allow me to show/hide options for command lines.

What do you mean by command lines and their options in your specific case?
Yacine

wapperdude

I took an existing file, and modified it to hide subordinates...uses a macro.  There could be some additional cleanup, but, it serves its purpose.

Start macro>select a shape>select connectivity type>run macro.  You may then, select another shape and do the same.

To restore, select previously selected shape and run macro.

Wapperdude
Visio 2019 Pro

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: 245 (show)
Files included: 34 - 1306KB. (show)
Memory used: 1093KB.
Tokens: post-login.
Cache hits: 13: 0.00142s for 26,631 bytes (show)
Cache misses: 1: (show)
Queries used: 16.

[Show Queries]