Author Topic: Reference to a "user-defined-cells" in container is lost after copy/paste  (Read 281 times)

0 Members and 1 Guest are viewing this topic.

Stef

  • Newbie
  • *
  • Posts: 2
I am using smart container+shapes shapesheet features in Visio 2016, with data linked to the container, and the shapes within the container referring to the linked data to influence the shape/text rendering and layer membership.
I am using "user-defined-cells"  to dynamically setup the layer membership based on the linked data. It all work nicely on the first container+shapes created
(See Before copy-paste.png screenshoot of the reference to the user-defined-cells User.Layers)
I have an issue when I copy/paste the initial container+shapes: After the copy/paste, in the new container+shapes , the reference to the "user-defined-cells" is lost and instead it shows the value of  the initial (copy) "user-defined-cells"
(See After copy-paste.png screenshoot of the value instead of the reference to the user-defined-cells)
Any idea why the reference to  the user-defined-cells User.Layers is lost (not copied) and instead the value is being copied?
« Last Edit: March 28, 2019, 07:00:41 AM by Stef »

Visio Guy

  • Administrator
  • Hero Member
  • *****
  • Posts: 1642
  • Smart Graphics for Visual People...n' Stuff
    • Visio Guy
Hi Stef,

I noticed that if you Ctrl+Drag a copy, then the reference to User.Layers doesn't break. But if you Ctrl+C /
Ctrl+V then it does.

You can wrap the layers formula with GUARD as so:

LayerMember=GUARD(User.Layers)

This will keep the formula intact, even on copy/paste.

However, editing the layers using the Assign to Layer function will have no effect.



For articles, tips and free content, see the Visio Guy Website at http://www.visguy.com
Get my Visio Book! Using Microsoft Visio 2010

Stef

  • Newbie
  • *
  • Posts: 2
Resolved - Thank you so much for your answer ! : :)