Did something change about Shapesheet behavior in new Visio versions?

Started by Visisthebest, January 16, 2022, 11:04:10 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Visisthebest

I tested Visio Guy's amazing color drop down selection demo:
http://www.visguy.com/2009/10/21/choose-colors-with-shape-data-fields/

however if I change any of the colors via the Shape data dropdown, they all change to black which I think probably indicates an error in the color value.

Has something changed in Visio's shapesheet behavior in more recent versions? (I tested on Visio 2019).

This is Visio Guy's download link for the file:
http://www.visguy.com/download/10525/

It would be great if we can get this 'color dropdown' functionality that Visio Guy created worked again in the recent Visio versions. Thank you for sharing your expertise!
Visio 2021 Professional

Visisthebest

I think Visio is no longer reading a string value: "RGB(R,G,B)" as a formula just as a string (the string is read from a semicolon-separated string)

The Visio calculation and drawing engine may be faster and more reliable by shutting down the possibility of having strings turn in to formulas, because that creates a ton of open ended possibilities. This would be one hypothesis for why this no longer works.

Visio 2021 Professional


wapperdude

This has a certain curiosity to it.   Unfortunately, I'm busy today and can't join in the fun.

I did see the repeating black issue Yacine experienced, but only briefly.  Seemed more like a glitchy bug.  It may have been that I had entered a number directly into the shape, thus somehow that became a text (string) rather than a number.  I posted file that has  lot of colored squares with option to tho click and enter an arbitrary, numeric vale.

I did NOT interpret that post as implying an issue with RGB() fcn, but rather with the palette function.  I did set the Prop to be numerical as the RGB() would expect such entries.  Don't recall using variables inside that function, but, again, the variable ought to be numeric.  Just saying.
Visio 2019 Pro

wapperdude

I've attached file I used to play around / explore.  Multiple features were incorporated. 
1) automatic numerical incrementing by 1
2) double clicking shape brings up data entry for manual setting/changing the color number value
3) high contrast coloring of the displayed values.  This has unintentiional value of showing subtle color changes near threshold of decision.
4) optional text scaling, 2 versions, to keep text within shape bounds and maintain overall shape size.

The 1st page is just a copy/paste progression, the numerical value automatically increments upon drop (copy/paste).  My impression is that the sequence of color changes is NOT predictable.  But, not sure which phase of the moon is responsible.

The 2nd page is duplicate of 1st, except for 2nd row.  The 2nd row has manual value changes, item 2 above.  As can be seen, sometimes the color matches it's original twin value, sometimes not.

3rd page is just an exersize of directly manipulating values within the RGB() function, which is then used to control the fill color.  This was the most predictable behavior....for as much as I investigated.

It is interesting to note, on page 1 (and 2), for low numerical values, these are entered as is in the FillForegnd cell.  At some point, I think it's "24", the FillForegnd cell shows an RGB() formula.  That was unexpected.

WRT to the VisioGuy reference.  For the limited variations that I tried, all seemed to work just fine.  I did not experience any blacking out....I'm fine.  VisioGuy is fine.  Y'all need to move to V2019 or back to V2007.  We do not speak Vxx1x around here.
Visio 2019 Pro

Visisthebest

Wapperdude thank you yes this demo works well, excellent thank you! (V2019)

Visio Guy's code works differently in his old demo, I think the key issue there is that any RGB function string, like, "RGB(0,0,255)", cannot be interpreted as a formula when its source is an index function that pulls a substring from a semicolondelimited string.
https://docs.microsoft.com/en-us/office/client-developer/visio/index-function

What do you think?
Visio 2021 Professional

wapperdude

Quote from: Visisthebest on January 17, 2022, 03:10:40 PM
What do you think?

First, I think that's exactly how VisioGuy's demo works.  The download link that you previously provided for convenience uses this approach.  Consider the first shape he shows, the single, large rectangle.  Open the shape sheet.  User  section has  3 rows.
first row:  list of names used by the ShapeData section, Format cell.
Second row:  a corresponding list of RGB defined by ";" separator, and wrapped in dbl quotes.  This satisfies your concern about list structure.
Third row is the Index functionality.  This row is read by the FillForegnd cell.

That it.  Works. 

As test, copy the 3rd row formula and directly paste it inside the "Guard()" wrapper of the FillForegnd cell.  In addition, note,  I added DOCMD(1312) to the Event DBL Click cell.  Once these edits are done, double  click the shape.  Choose a different color.  Viola!  Shape fill changes colors as expected / anticipated.

Finally, I created a simplified version that dispenses with the very helpful color names and merely requests a numerical entry.  It is located here:  http://visguy.com/vgforum/index.php?topic=9750.msg44156;topicseen#msg44156

If you still have issues, up load a file so that we might check it out.
Visio 2019 Pro

Visisthebest

So wapperdude Visio Guy's file works on your computer? I will try on a Visio 2016 PC as well, I use 2019 with the latest updates.
Visio 2021 Professional

wapperdude

Yes.  I'm using V2019 Pro.

BTW, added a link in my previous post.  There's a simplified shape, reduced down from Visio guy's development.
Visio 2019 Pro