ARG function does not work.

Started by JuneTheSecond, January 17, 2011, 07:04:57 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

JuneTheSecond

ARG function does not work, if  shape has master.
If you don't overwrite User.Rx.Promt cell.

I've made a simple shape that has ARG function and EVALCELL functions.
The shape has ARG function like a
User.Rx = Geometry1.X1+ARG("n")/3*(Controls.Row_1-Geometry1.X1),
and has EVALCELL funcion such as
Geometry1.5X=GUARD(EVALCELL(User.Rx,"n",1))
Geometry1.6X=GUARD(EVALCELL(User.Rx,"n",2))
Geometry1.7X=GUARD(EVALCELL(User.Rx,"n",3)).

They works fine if the shape is a simple shape that has no master.
But they does not work, when I dropped from document stencil,
until I overwrite the User.Rx cell or User.Rx.Prompt cell.

It must be, I have forgot something primitive and important.

Any suggestion?
I am using Visio 2010, but may be same in Visio2007.
Best Regards,

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

JuneTheSecond

I got a solution, but it is ugly.
Now ARG function works fine, even if the shape has master.
In ARG function you should separate geometry formula from numerical argumet.
ARG function was modified into
User.RX = ARG("n")/3
User.A = Geometry1.X1
User.B = Controls.Row_1-Geometry1.X1.
And EVALCELL functions were modified like
Geometry1.X5 = GUARD(User.A+EVALCELL(User.Rx,"n",1)*User.B)
Geometry1.X6 = GUARD(User.A+EVALCELL(User.Rx,"n",2)*User.B)
Geometry1.X7 = GUARD(User.A+EVALCELL(User.Rx,"n",3)*User.B)
But please, give me more elegant solution.
Best Regards,

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

JuneTheSecond

#2
May be, I've come to the final solution.

ARG function is a
User.Rx = ARG("x1")+ARG("n")/3*(ARG("x2")-ARG("x1")),

and EVALCELL function are
Geometry1.5x = GUARD(EVALCELL(User.Rx,"n",1,"x1",Geometry1.X1,"x2",Controls.Row_1))
Geometry1.6x = GUARD(EVALCELL(User.Rx,"n",2,"x1",Geometry1.X1,"x2",Controls.Row_1))
Geometry1.7x = GUARD(EVALCELL(User.Rx,"n",3,"x1",Geometry1.X1,"x2",Controls.Row_1))

But it is not yet elegant.
Best Regards,

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