Author Topic: A max of only 50 Actions rows displayed?  (Read 6455 times)

0 Members and 1 Guest are viewing this topic.

Hey Ken

  • Full Member
  • ***
  • Posts: 218
  • Just This Guy
    • The Pennsylvania Project, with Ken Krawchuk
A max of only 50 Actions rows displayed?
« on: September 19, 2017, 02:47:47 PM »
Folks:

   Well, here I am at the edge of Visio again.

   As I mentioned a few years back, I have this huge Visio screenflow with hundreds of pages.  It’s hyperlinked hierarchically, so it’s easy to traverse the beast.  Although it’s easy to go downhill, going back isn’t always so simple.  For example, what if a dozen screens link to one particular screen?  If you’re starting on that screen, where could you have possibly come from?

   No problem!  I wrote a quick VBA routine that stores the “came from” page name as an action row on the destination page’s shapesheet, with the action being GOTOPAGE(“X”), and the menu name being the name of calling page.  So if you right-click on the page background, it shows you the names of every page that calls it.  Click on one of them and it jumps to the calling page.  Works just fine, except...

   One page is called from about 100 others (an “Are you sure?” sort of popup), but when you right-click on the page, only about 30 entries fit on the screen.  No problem!  I added a “previous” action and a “next” action every 25 entries.  They decrement and increment a paging factor so that only 25 actions are visible on the screen at any time; the others are rendered invisible based on the factor.  Works fine, except...

   Apparently Visio 2013 does not handle more than 50 right-click actions.  Only the first 50 are available to be displayed, so when I'm trying to display entries 75 to 100, Visio doesn't display any of them.  Argh.  I looked, but couldn’t find a chronicle of Visio limits; but I sure found a limit.

   Thoughts?  (Besides Vojo’s original comment about my large file, that is!)

   - Ken

Ken V. Krawchuk
'caster

The Pennsylvania Project
Radio Podcast

10 to 11 AM Saturdays on WWDB 860 AM in Philadelphia
7 to 8 AM Mondays on KUR 1670 AM in Kutztown
On demand at http://PennsylvaniaProject.com

wapperdude

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3794
  • Ideas Visio-lized into solutions
Re: A max of only 50 Actions rows displayed?
« Reply #1 on: September 19, 2017, 04:48:34 PM »
Are these 3x5 cards for a debate and .... oh never mind.

Would this be a document or a page limit?  Perhaps a slightly different methodology, albeit, cluggie (sp?).  So, 1st 50 in shape A  and next 50 in shape B.  Then, rt click or maybe dbl click shape to proceed to desired destination.  No, you do not get to collect $200.

Just a thought.  Might trigger an idea.

Wapperdude
Visio 2019 Pro

vojo

  • Hero Member
  • *****
  • Posts: 1475
Re: A max of only 50 Actions rows displayed?
« Reply #2 on: September 19, 2017, 10:22:31 PM »
it might be more like "only 50 can be shown from UI"
2003 has the same problem with props...usually went down the path of some logic/actions to set the hidden cell o each prop.

Yacine

  • Hero Member
  • *****
  • Posts: 2698
Re: A max of only 50 Actions rows displayed?
« Reply #3 on: September 19, 2017, 11:43:54 PM »
A silly idea ... when you look at breadcrumb links on internet pages ( https://en.wikipedia.org/wiki/Breadcrumb_(navigation) ), you'll notice that they don't display the whole path.
Usually it's something like Top, Level1, Level2, ... , Level n-2, Level n-1
With that idea in mind you could rewrite your navigation and would need far less action rows.
It will also overwhelm less the user.

Y.
« Last Edit: September 19, 2017, 11:45:32 PM by Yacine »
Yacine

Hey Ken

  • Full Member
  • ***
  • Posts: 218
  • Just This Guy
    • The Pennsylvania Project, with Ken Krawchuk
Re: A max of only 50 Actions rows displayed?
« Reply #4 on: September 21, 2017, 10:30:50 AM »
Yacine:

   Interesting suggestion, but it’s not a breadcrumb situation.  One page could be called by 100 others, so which breadcrumb path would I display?  If I understand your suggestion correctly, I’d need all of them, so I’d still ultimately need to have all 100 pages as actions.  Back to Square One.


Paperdude:

   Hey, I don’t need no stinkin’ 3x5 cards – I’m a Toastmaster!

   Thanks for the suggestion.  I guess I could add one or more shapes to the page, name them “Callers 1-50”, “Callers 51-100”, etc., but they’d surely get in the way.  When I create them I’d have to make sure they don’t overlay something, and that makes it complicated.  And what if there’s no room at all?  Looks like no $200 for you either.  ;- )

   But you did get me thinking about other constructs that could be used, and I came up with one: A userform!  But that opened up a whole can of worms because I’d have to build it on the fly.  I put a toe into that water and found it’s theoretically possible, thanks (once again) to Chip Pearson and his excellent page on how to program the VBA editor.  While he doesn’t create a userform, there was enough info to get me started:

Code

Sub AddUserformToProject()

Dim VBProj As VBIDE.VBProject
Dim VBComp As VBIDE.VBComponent
       
Set VBProj = ActiveDocument.VBProject
Set VBComp = VBProj.VBComponents.Add(vbext_ct_MSForm)
VBComp.Name = "Callers"

End Sub


   That creates the userform, and from there it gets complicated.  I’d have to figure out how to add a button per caller (no idea how yet), then add the code to handle the button click (which Chip does describe), and resize the userform as I add each button.  Probably best to keep the page actions as they are, but add a “All” option that displays the userform, but only in the event there are more than 50 page names.

   Then again it’s lots of work to handle only one situation, so I’ll probably just leave it as it is since most pages are called by only one or two other pages.  And since I distribute the beast as a PDF (which doesn’t show the right click options), nobody will see them anyway.

   But I don’t give up easily.  There may still be another way...

   - Ken
Ken V. Krawchuk
'caster

The Pennsylvania Project
Radio Podcast

10 to 11 AM Saturdays on WWDB 860 AM in Philadelphia
7 to 8 AM Mondays on KUR 1670 AM in Kutztown
On demand at http://PennsylvaniaProject.com

Paul Herber

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 2891
    • Paul Herber's website
Re: A max of only 50 Actions rows displayed?
« Reply #5 on: September 21, 2017, 10:47:49 AM »
Your GOTOPAGE(X) routine - why not store the page you've come from within the destination page in a user-defined cell, so you always know where you've come from. Ok, it means the document will always have changes that Visio will ask if you want saved ...
Electronic and Electrical engineering, business and software stencils and applications for Visio -

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

Hey Ken

  • Full Member
  • ***
  • Posts: 218
  • Just This Guy
    • The Pennsylvania Project, with Ken Krawchuk
Re: A max of only 50 Actions rows displayed?
« Reply #6 on: September 21, 2017, 01:35:25 PM »
Paul:

   Thanks for the suggestion, but it doesn’t quite fit what I’m looking for.  What you’re describing is a Back button (which I’ve already solved).  And yes, it does have that annoying behavior of always asking you if you want to save your changes.

   What I need is a list of all other pages that link to this one, with the option of jumping to any one of them.  I currently have that working as a right-click on the page background, with each calling page being an entry in the Actions shapesheet section along with an appropriate GOTOPAGE action.  But as this thread title suggests, Visio only displays a max of 50 action rows.  Bummer.

   But now you have me thinking about something else entirely...  It is possible to eliminate that annoying “save your changes?” behavior by using ThisDocument.Saved.  Whatever value it held before I did my Back function, I just restore it.  That way if changes were pending before the Back, changes would still be pending afterward.  If no changes were pending, then Visio would still think there were none pending even though a user cell was updated.

   So Visio will never needlessly ask that unneeded question ever again.  Another keystroke avoided!  Another victory for laziness!  Woo hoo!!!  Thanks for triggering the thought, Paul!

   - Ken

Ken V. Krawchuk
'caster

The Pennsylvania Project
Radio Podcast

10 to 11 AM Saturdays on WWDB 860 AM in Philadelphia
7 to 8 AM Mondays on KUR 1670 AM in Kutztown
On demand at http://PennsylvaniaProject.com

wapperdude

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3794
  • Ideas Visio-lized into solutions
Re: A max of only 50 Actions rows displayed?
« Reply #7 on: September 21, 2017, 04:25:28 PM »
The shortlist sounds promising.  Here's a scenario..opening a Visio doc triggers a macro that creates a list on each page containing all pages linked to it.  Then, when queried, user form grabs the page's list, and viola!  Rather than a user form, perhaps the list is a hyperlink table/list?  Hopefully with no 50 max limit.  User form may be better option.

Toastmasters???   Sourdough, golden brown, light on the butter.  Thanks.  😁
Visio 2019 Pro

metuemre

  • Full Member
  • ***
  • Posts: 174
Re: A max of only 50 Actions rows displayed?
« Reply #8 on: September 22, 2017, 03:11:24 AM »
You can create a userform with a Treeview control on it and thanks to NodeClick event of Treeview, you can navigate to other pages with one click. Please see a sample application on my template.
In your case you will add all pages to treeview control and for each page you will add linked pages as child nodes.


Hey Ken

  • Full Member
  • ***
  • Posts: 218
  • Just This Guy
    • The Pennsylvania Project, with Ken Krawchuk
Re: A max of only 50 Actions rows displayed?
« Reply #9 on: September 25, 2017, 10:33:04 AM »
Metuemre:

   Interesting suggestion, Treeview, but I see that it has a limit of 100 child nodes.  Oops!  And I’m not sure how many would fit on the screen—only about 30 Actions fit.  Also, Treeview is only good for Visio 2007+, and I’m still running 2002 and 2003 at home.  And based on hard experience I have an aversion to Visio add-ons; they can get very temperamental and difficult to get just right. 


PaperWapper:

   Interesting suggestion, using hyperlinks, but that has an additional problem: no flyouts.  So all 100+ would appear in the right-click list.  Oops!

   Rather than diddling around with userforms and self-coding their handlers (which may not work depending on site security), I’m thinking the easiest solution would be to create my own fake form.  Imagine a grouped shape where the outside box looks like a userform, and grouped inside it are individual shapes, one per calling page, each hyperlinked to their respective calling pages.  The entire shape would be automagically created by a single right-click page action, and automagically deleted on the next click.  The best part is that I already know how to do all that, where I’ve never used Treeview or tried to dynamically build a userform.  Laziness triumphs again!

   Incidentally, Toastmasters has nothing to do with burning bread or raising glasses.  It’is an international organization whose mission is to provide a supportive environment for learning public speaking and leadership skills.  You could have the best message on the planet, but it’s useless if you can’t communicate it or effectively organize its distribution.  Before I joined Toastmasters I was a geek developer afraid to come out from behind my keyboard; now I’m a business architect routinely dealing with C-level people and showing them my wonderful Visio drawings that you and other fine forum folks have taught me how to build.  Joining Toastmasters changed my life--and increased my salary!

   Thanks for the thoughts, as always.

   - Ken

Ken V. Krawchuk
'caster

The Pennsylvania Project
Radio Podcast

10 to 11 AM Saturdays on WWDB 860 AM in Philadelphia
7 to 8 AM Mondays on KUR 1670 AM in Kutztown
On demand at http://PennsylvaniaProject.com

wapperdude

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3794
  • Ideas Visio-lized into solutions
Re: A max of only 50 Actions rows displayed?
« Reply #10 on: September 25, 2017, 12:50:51 PM »
Hey, Hey Ken...

Yes, I'm aware of Toastmastrs.  I was just messing with you...oh, you know, it was food for thought.  Yikes!!!  😱 🙊  😠
Visio 2019 Pro

Paul Herber

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 2891
    • Paul Herber's website
Re: A max of only 50 Actions rows displayed?
« Reply #11 on: January 10, 2020, 09:27:33 AM »
I've just hit this limit of 50 actions on a shape. How infuriating!

This is in Visio 2016.
Electronic and Electrical engineering, business and software stencils and applications for Visio -

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

vojo

  • Hero Member
  • *****
  • Posts: 1475
Re: A max of only 50 Actions rows displayed?
« Reply #12 on: January 10, 2020, 12:58:07 PM »
cascade / drill down using action rows.

Hey Ken

  • Full Member
  • ***
  • Posts: 218
  • Just This Guy
    • The Pennsylvania Project, with Ken Krawchuk
Re: A max of only 50 Actions rows displayed?
« Reply #13 on: January 13, 2020, 09:25:29 AM »
Paul:

   I feel your pain still, after all these years.


Vojo:

   Not sure what you mean.  There's still that 50-row limit.

   However, reading through this old thread got me thinking about a possible solution based on a recent project I did.  In it, I create literally hundreds of User section rows.  I was originally concerned that too many rows would slow things down, but a test showed it takes thousands before you begin to notice any degradation. 

   Since there's effectively no limit, that got me to thinking that I could put the names of the 100+ pages into the User section, one page to a User row, with row names like User.Caller_1, User.Caller_2, etc.   In the Action section, I can create 25 rows that use User.Caller_1, etc. as their target pages.  To access the next 25, I can add a factor that is used to build the target page names in the Action row such that instead of User.Caller_1, etc., it calculates the page name as User.Caller_26, etc.   That way, the existing 25 Action rows can be used to reach every page in batches of 25, thereby respecting the 50-row limitation and leaving room for other actions as needed.

   I haven't tried to build the beast, but I suspect the Actions.Action would look something like...

Code

=GOTOPAGE(User.Caller_" & 1+(25*(User.PageNumber-1)) & ")"
=GOTOPAGE(User.Caller_" & 2+(25*(User.PageNumber-1)) & ")"
=GOTOPAGE(User.Caller_" & 3+(25*(User.PageNumber-1)) & ")"
etc.


   ...where Next and Previous actions would increment and decrement User.PageNumber, respectively.  Looks like I might have to put each target page name formula in its own User row, but I think the example above gives you the general idea. 

   So with only 25 action rows, I can have thousands of available pages I could jump to, with a choice of 25 at a time; and it could be built as a flyout to keep things out of the way until you needed it.

   I'll check back in if/when I implement it.  Right now it's not crucial to anything I'm doing, so it goes on the list.  But it looks like it'd work.  We'll see...

   - Ken



Ken V. Krawchuk
'caster

The Pennsylvania Project
Radio Podcast

10 to 11 AM Saturdays on WWDB 860 AM in Philadelphia
7 to 8 AM Mondays on KUR 1670 AM in Kutztown
On demand at http://PennsylvaniaProject.com

vojo

  • Hero Member
  • *****
  • Posts: 1475
Re: A max of only 50 Actions rows displayed?
« Reply #14 on: January 13, 2020, 09:34:12 AM »
you can have 1000s of rows....just cant display them well...hence the discussion about drill down / show groups of data.
Your are lucky if you can show 50 without heartburn trying to show all (cant really play with spacing and font to squeeze in)
30 is about the limit (on older versions of visio) without having to scroll (on newer versions)

But, hey, go for it