Layer Membership - formula on Master converted to string when placed on page

Started by MicahCole, February 24, 2021, 11:49:06 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

MicahCole

I'm building a Master shape in a stencil.
I have an IF statement in my Layer Membership field of the shapesheet.
It points a custom property and chooses a layer.
Everything works when editing the Master.

But once I place it on the page, the formula is over written with a string, whatever the result of the formula was when I placed it.
If I edit the formula of the shape on the page, everything works on the page as well, but when I drag it back to the stencil, same issue.
Something about the conversion between the stencil and the page, overwrites that formula.
I've tried using Guard(), I've protected the LockCustProp, nothing seems to keep it.

Any ideas on how to protect that formula?

wapperdude

You can force the formula to be written into the desired cell by using SETF & GETREF fcns in the Event section, EventDrop cell.

Enter a formula like:  =SETF(GetRef(User.Row_1),"IF(width>1,True,False)")  Where User.Row_1 is the target for the IF statement.  Note the quotes around the IF statement.  Obviously, use your IF statement.

This should overwrite anything that Visio does before the shape is dropped, or duplicated.
Visio 2019 Pro

MicahCole