Author Topic: Angle Line using SETATREF function  (Read 7772 times)

0 Members and 2 Guests are viewing this topic.

JuneTheSecond

  • Hero Member
  • *****
  • Posts: 1027
    • Visio Shapes, Stencils and Sample Drawings
Angle Line using SETATREF function
« on: January 07, 2016, 07:09:57 PM »
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.
« Last Edit: January 07, 2016, 07:13:38 PM by JuneTheSecond »
Best Regards,

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

wapperdude

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 4596
  • Ideas Visio-lized into solutions
Re: Angle Line using SETATREF function
« Reply #1 on: January 07, 2016, 11:12:08 PM »
Brilliant!   ;D
Visio 2019 Pro

wapperdude

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 4596
  • Ideas Visio-lized into solutions
Re: Angle Line using SETATREF function
« Reply #2 on: January 07, 2016, 11:18:54 PM »
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

  • Hero Member
  • *****
  • Posts: 1027
    • Visio Shapes, Stencils and Sample Drawings
Re: Angle Line using SETATREF function
« Reply #3 on: January 08, 2016, 02:04:39 AM »
Thanks, and really strange!
Best Regards,

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

wapperdude

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 4596
  • Ideas Visio-lized into solutions
Re: Angle Line using SETATREF function
« Reply #4 on: January 08, 2016, 02:44:45 AM »
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

  • Hero Member
  • *****
  • Posts: 1027
    • Visio Shapes, Stencils and Sample Drawings
Re: Angle Line using SETATREF function
« Reply #5 on: January 11, 2016, 07:42:03 PM »
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/