Visio Guy

Visio Discussions => ShapeSheet & Smart Shapes => Topic started by: Stef on March 28, 2019, 11:53:36 AM

Title: Reference to a "user-defined-cells" in container is lost after copy/paste
Post by: Stef on March 28, 2019, 11:53:36 AM
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?
Title: Re: Reference to a "user-defined-cells" in container is lost after copy/paste
Post by: Visio Guy on March 28, 2019, 12:41:29 PM
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.



Title: Re: Reference to a "user-defined-cells" in container is lost after copy/paste
Post by: Stef on March 28, 2019, 01:24:49 PM
Resolved - Thank you so much for your answer ! : :)