Visio Guy

Visio Discussions => ShapeSheet & Smart Shapes => Topic started by: Thomas Winkel on May 10, 2014, 08:21:01 PM

Title: New formulas are not evaluated
Post by: Thomas Winkel on May 10, 2014, 08:21:01 PM
Hi,

I've added a new user cell "User.Test ="Hello "&Prop.Name" to a master shape in the document stencil and updated all instances of this shape.
My problem is that this formula is not evaluated in the existing shapes.
The value is "Hello" in every shape.
When I edit this cell and just press enter the formula is evaluated and the value changes to "Hello Name" as expected.

Any idea, how to force all shapes to evaluate the new user row at once?

Thanks,
Thomas
Title: Re: New formulas are not evaluated
Post by: Yacine on May 10, 2014, 09:39:47 PM
Hi Thomas,
there are not a lot of answers to this question around the net.
I did only find 2 topics:
http://visguy.com/vgforum/index.php?topic=1199.msg5163#msg5163 with an answer from Vojo, which is feasable.
http://www.visguy.com/2008/02/25/edit-visio-masters-programmaticallythe-right-way/ . I did try the code sample, but it did not refresh the instances.
What definitely works (not elegantly) is to add a second field to write in the first one:
user.newfield = SETF(GetRef(User.test),"Hello"&Prop.Name)
Title: Re: New formulas are not evaluated
Post by: Thomas Winkel on May 11, 2014, 02:48:23 PM
Thanks, Yacine.

Curiously the formula just needs to be "activated" once by a trigger.
After the first trigger everything works fine.

I had to update hundreds of shapes in a running project with a new feature.
As "Prop.Name" is linked to an Excel sheet I was able to start the first trigger by temporary changing the values in Excel, refresh data in Visio and finally restore the correct data.

Best regards,
Thomas
Title: Re: New formulas are not evaluated
Post by: Yacine on May 11, 2014, 05:01:07 PM
That's not really satisfactory. At least you could help yourself.
Gruß,
Yacine
Title: Re: New formulas are not evaluated
Post by: JuneTheSecond on May 12, 2014, 12:52:09 AM
I've experienced user defined cells sometimes need DEPENDSON function.
For example, DEPENDSON(Prop.Name)+"Hellow"&Prop.name.