Author Topic: Wierd ShapeSheet FillForegnd behaviour  (Read 4801 times)

0 Members and 1 Guest are viewing this topic.

AJD

  • Jr. Member
  • **
  • Posts: 29
Wierd ShapeSheet FillForegnd behaviour
« on: January 04, 2018, 07:24:30 PM »
I have a work related problem and, as such, I cannot attach the example file. I have tried to duplicate the issue in a new file on a different system (so that I could get an uploadable example), but was not successful.

I had a working dynamic shape in the original file (multiple diagrams, but the shape in question was only on one diagram). I copied the relevant drawing (Ctrl-A, Ctrl-C, Ctrl-V) from that file into a new file (I had multiple drawings from three files that I wanted to collate into a new file). For work-related reasons, I cannot use the original file.

I use dynamic shapes as part of a diagram, where the user can change the shape data (i.e. change a category) and the shape will change colour. The mechanics for this are in the ShapeSheet.

The key piece of data (Prop.Category) is an index from a fixed list of options. A User field (User.ForeColour) uses the Prop.Category data to determine the RGB colour value from another fixed list (another index/lookup formula). I have FillForegnd set to access User.ForeColour directly.

In my example here, the user selects Prop.Category #3, which indirectly sets User.ForeColour to RGB(128,0,128). However, in my current file setup, the FillForegnd is then set to RGB(64,86,150). When I select other categories the FillForegnd values are also changed from the expected value.

I have checked the ShapeSheet using both the formula and values view. Everything is correct (except for the final value in FillForegnd). Double checking User.ForeColour shows that it holds the value RGB(128,0,128) as expected.

Interestingly, if I overwrite the formula in User.ForeColour with the static value RGB(128,0,128), FillForegnd is correctly populated and the shape shows the correct colour. Return to the formula (which still ends up at the right value) and the FillForegnd is again populated with the wrong RGB value.

I have checked and removed themes, this has had no effect.

Visio 2010, Networked Windows 7 environment. The file with the original master shape still works as expected. The new file with the copied shapes (and by default, the copied master) is the one with problems. I have double checked the ShapeSheet and the default/master settings are as expected (black text) and the tailored choices (blue text) are as expected.

I don't know where else to look to see if anything has changed. Any hints on why it may be doing this, or anyone else noticing the same behaviour would be greatly appreciated. As noted above, I have not been able to replicate this on another system so I can post an example here. It can't be system related if one file works and the other doesn't.
« Last Edit: January 04, 2018, 07:26:27 PM by AJD »

vojo

  • Hero Member
  • *****
  • Posts: 1523
Re: Wierd ShapeSheet FillForegnd behaviour
« Reply #1 on: January 05, 2018, 09:27:52 AM »
fillforegnd = guard(user.forecolore)

AJD

  • Jr. Member
  • **
  • Posts: 29
Re: Wierd ShapeSheet FillForegnd behaviour
« Reply #2 on: January 08, 2018, 01:26:41 AM »
I tried adding the GUARD condition, but no change to what was happening.

I did a comparison with the original file. I dropped the same master onto the page and did a line-by-line comparison of the shapesheet. Apart from the X-Y location (to be expected) and the addition of GUARD() , no difference in the shapesheets. The old file worked as expected, the new file did not. Both files are in the same folder.

I have also checked the document shapesheet. The new file has visTLSShowProps, visTLSShowPropsOn, visTLSShowPropsOff, as additional User.Properties, but these would be related to another diagram in the document. Likewise, no significant difference in the Page shapesheet.

I have checked the layer properties (in case I had some funky transparency thing), but all is normal there. While I have some VBA in the background of both files, there are no differences there (none of the modules make changes to that diagram and they are not autorun/event driven).

I have created a test file on that network (using “save as”). I have removed all extraneous sheets and VBA. No difference.  I removed the TLSShowProps items, no difference.

I have modified one of the dropped shapes with two additional derived data elements: one that shows User.Activity_ForeColour, and one that shows FillForeGnd. Remembering that FillForegnd is now set in formula to “ =GUARD(User.Activity_ForeColour) ”.

I have run through the various values (RGB), these are actual numbers I have taken from the dropped shape.
What it should be (as set in User.Activity_ForeColour) ..|.. What is set in FillForegnd 
0,0,1280,0,153
0,128,00,128,0
0,0,22064,86,150
128,0,12864,86,150
200,0,20064,86,150
200,200,0163,163,0
50,50,5084,95,46
255,255,255255,255,255

Don’t what else to try or where else to look to get hints on what is happening.

Still don't have example files that I can copy to here - network policy issues.



Yacine

  • Hero Member
  • *****
  • Posts: 2710
Re: Wierd ShapeSheet FillForegnd behaviour
« Reply #3 on: January 08, 2018, 05:04:29 AM »
Diagnosis without shape VERY difficult.
Yacine

vojo

  • Hero Member
  • *****
  • Posts: 1523
Re: Wierd ShapeSheet FillForegnd behaviour
« Reply #4 on: January 08, 2018, 09:06:45 AM »
Well...I do that all the time

See enclosed (built in 2003 context...probably 10 years ago)

AJD

  • Jr. Member
  • **
  • Posts: 29
Re: Wierd ShapeSheet FillForegnd behaviour
« Reply #5 on: January 09, 2018, 01:37:49 PM »
Diagnosis without shape VERY difficult.

I agree and apologise, but organisational policies are what I am trying to navigate. I am still hoping to get my example files through.

wapperdude

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3828
  • Ideas Visio-lized into solutions
Re: Wierd ShapeSheet FillForegnd behaviour
« Reply #6 on: January 09, 2018, 02:57:30 PM »
Can you make a dumby-downed version, with no proprietary info?

Wapperdude
Visio 2019 Pro

AJD

  • Jr. Member
  • **
  • Posts: 29
Re: Wierd ShapeSheet FillForegnd behaviour
« Reply #7 on: January 10, 2018, 12:20:43 AM »
Can you make a dumby-downed version, with no proprietary info?

Wapperdude

I have now created the dumbed down versions but still need to navigate system and organisational policies to get these off the network.  Understandable from where I am sitting, but probably sounds weird to most forum visitors.

The dumbed down versions still exhibit the behaviours I have described. If/when I get them off the system, I won't be able to double check the behaviours (I don't have Visio on my home system ... yet) so would be posting them in blind faith.

In the meantime, I can still be eyes and ears if anyone has any ideas and wants me to check something that I have not already checked/explained.

wapperdude

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3828
  • Ideas Visio-lized into solutions
Re: Wierd ShapeSheet FillForegnd behaviour
« Reply #8 on: January 10, 2018, 01:18:42 AM »
Perhaps you could try this.  Duplicate your working file and verify it still works.  Then, instead of copying what you need, start removing what you don't need.  Verify that all is well as you remove stuff.  You might find a breaking point, or you might be successful in your trimming efforts.  This would at least prove whether or not the elements you want maintain integrity.

If all is well, then you can either copy / paste into new file or, starting adding stuff into this file.  The thing with copy / paste, if you don't do it all at once, some links might be broken.

Your description seems to indicate that a lot of steps have been performed, and somewhere, something broke.  You need to go back and see if you can isolate the problem step.

Wapperdude
Visio 2019 Pro

AJD

  • Jr. Member
  • **
  • Posts: 29
Re: Wierd ShapeSheet FillForegnd behaviour
« Reply #9 on: January 10, 2018, 02:24:17 PM »
Perhaps you could try this.  Duplicate your working file and verify it still works.  Then, instead of copying what you need, start removing what you don't need.  Verify that all is well as you remove stuff.  You might find a breaking point, or you might be successful in your trimming efforts.  This would at least prove whether or not the elements you want maintain integrity.

If all is well, then you can either copy / paste into new file or, starting adding stuff into this file.  The thing with copy / paste, if you don't do it all at once, some links might be broken.

Your description seems to indicate that a lot of steps have been performed, and somewhere, something broke.  You need to go back and see if you can isolate the problem step.

Wapperdude

I have already created new versions of each file and removed all stuff not required (including all macros) so that each file is now a single page with only a few shapes on it.  No change in behaviours (which should indicate something).

The only thing that I did in the original  process (which seems to have broken something) is to copy some shapes from one file into another file. I copied from page to page (i.e. Ctrl-A, Ctrl-C, Ctrl-V). The problem is not unique to the shapes I have in my test page, I have another set of shapes in the stencil that are exhibiting the same behaviour (the underlying shapesheet formulas are similar) - buy I figured that if I can solve this for these shapes I will have an answer that I can use to check the whole file.

wapperdude

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3828
  • Ideas Visio-lized into solutions
Re: Wierd ShapeSheet FillForegnd behaviour
« Reply #10 on: January 10, 2018, 03:09:03 PM »
Seems like your method is correct.  It's good that the stripped down files are functioning properly.

When you paste, does everything go onto same page?  That ought to work.  Perhaps for trouble shooting, copy paste from one file, verify still works.  Create a 2nd page, copy paste from next file.  Verify that both pages still work.  If so, do third page and 3rd file.  Again, verify everything still works.  Then, copy from 2nd page and paste onto 1st.  Verify everything on 1st page still works.  Repeat for 3rd page.  Theoretically, one of the steps probably causes a problem....that should simplify trouble shooting.

Wapperdude
Visio 2019 Pro

AJD

  • Jr. Member
  • **
  • Posts: 29
Re: Wierd ShapeSheet FillForegnd behaviour
« Reply #11 on: January 11, 2018, 12:15:15 AM »
Seems like your method is correct.  It's good that the stripped down files are functioning properly.
[...]


Apologise if we are at cross-communications. The stripped down files are behaving as before - one works, one does not. When I pasted, it was page-for-page (Visio 2010 - couldn't just copy a page from one file to another like in Excel!).

I have now navigated our internal processes and I have two files for comparison. My caveat here is that I could not open the files in Vision on my system simply because I do not have Visio. I opened the files and the default viewer is Internet Explorer and I could still see a colour difference.

OK, slight issue - one file size is still 580KB - didn't realise the file size limitations on this forum.

wapperdude

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3828
  • Ideas Visio-lized into solutions
Re: Wierd ShapeSheet FillForegnd behaviour
« Reply #12 on: January 11, 2018, 01:44:27 AM »
Yeah.  I think we're still not on the same page.  My understanding was you copied relevant pieces from  3 files to make the new file, and the new file does not work.  But, for the method I outlined, the number of original files is not important.

For the moment, forget about your non-working new file.  We're going to ignore it.

Take your 1st, working file and duplicate it.  Everything should still work with the duplicate file, yes?  Now, with this duplicate file, start removing what you don't need....shapes, macros, pages...until you get down to just what you want.  Do this in stages, not everything at once.  At each step, you should verify that your dynamic shape still works.  If not, you've identified where to look for the problem and should be able to make corrections.  Eventually, all you should have left is working, and is identical to what you want copied into that "old" new master file.

Now, do this for your other files.  You should have 3 stripped down "duplicate", working files.  Now, you can start creating your new master file as previously discussed.  If all goes well, the new file should work as desired.  Now, throw away that faulty, non-working, new file.

Wapperdude
« Last Edit: January 11, 2018, 10:02:07 AM by wapperdude »
Visio 2019 Pro

AJD

  • Jr. Member
  • **
  • Posts: 29
Re: Wierd ShapeSheet FillForegnd behaviour
« Reply #13 on: January 11, 2018, 01:53:26 PM »
I have managed to trim the files down to the post-acceptable size. The non-working file is attached to this post, the working example will be attached to the next post.

@wapperdude: Yes, I could try different ways of copying shapes from one file to another. But at the time what I did was right (and I would still consider it to be right based on what Microsoft says should work). Rather then spend a couple of days trimming and reworking files, I just recognise that I have a curly problem here - one that has persisted multiple file edits, saves and transfers. And I can see no visible reason why this problem exists. Even if a repeat does cause the same error, I will be in the same position now - no logical reason why the error is occurring.

AJD

  • Jr. Member
  • **
  • Posts: 29
Re: Wierd ShapeSheet FillForegnd behaviour
« Reply #14 on: January 11, 2018, 01:54:47 PM »
The working example. When I loaded the files on an old laptop (where I have Visio), the problem still existed. Note the difference in colours for the shapes - they should be identical.