Angle Line using SETATREF function

Started by JuneTheSecond, January 08, 2016, 12:09:57 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

JuneTheSecond

Here is a Visio drawing of Angle Line.
Angle is fixed unless otherwise you change shape data.
Here are 2 shapes, one has simple shape data, another has shape data in the type of editable dropdown list.

SETATREF function are used to define end point of line.
EndX = SETATREF(User.DeltaX,SETATREFEVAL(SETATREFEXPR(128.5673 mm)-BeginX))*0+BeginX+User.Len*User.Cos
EndY = SETATREF(User.DeltaY,SETATREFEVAL(SETATREFEXPR(218.4292 mm)-BeginY))*0+BeginY+User.Len*User.Sin

I spent time to find the point to use and kill SETATREF function by *0.
Best Regards,

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

wapperdude

Visio 2019 Pro

wapperdude

Hmmmm.  It does do something funky if you try to connect to the line end.  Begin is OK, just the End is a problem.

Still Brilliant, though.

Wapperdude
Visio 2019 Pro

JuneTheSecond

Best Regards,

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

wapperdude

I didn't watch the shapesheet, but I suspect Visio is trying to write a new formula to the End X, Y cells and the SETATREF is finding that to be most disagreeable.

Visio 2019 Pro

JuneTheSecond

Thank you, wapperdude.

Now, fixed it. Added PNTX and PNTY functions.
EndX = SETATREF(User.DeltaX,SETATREFEVAL(PNTX((SETATREFEXPR(141.5204 mm)))-BeginX))*0+BeginX+User.LEN*User.COS
EndY = SETATREF(User.DeltaY,SETATREFEVAL(PNTY(SETATREFEXPR(216.6769 mm))-BeginY))*0+BeginY+User.LEN*User.SIN
Best Regards,

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