New formulas are not evaluated

Started by Thomas Winkel, May 10, 2014, 08:21:01 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Thomas Winkel

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

Yacine

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)
Yacine

Thomas Winkel

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

Yacine

That's not really satisfactory. At least you could help yourself.
Gruß,
Yacine
Yacine

JuneTheSecond

I've experienced user defined cells sometimes need DEPENDSON function.
For example, DEPENDSON(Prop.Name)+"Hellow"&Prop.name.
Best Regards,

Junichi Yoda
http://june.minibird.jp/