News:

BB code in posts seems to be working again!
I haven't turned on every single tag, so please let me know if there are any that are used/needed but not activated.

Main Menu

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/

Browser ID: smf (is_webkit)
Templates: 4: index (default), Display (default), GenericControls (default), GenericControls (default).
Sub templates: 6: init, html_above, body_above, main, body_below, html_below.
Language files: 4: index+Modifications.english (default), Post.english (default), Editor.english (default), Drafts.english (default).
Style sheets: 4: index.css, attachments.css, jquery.sceditor.css, responsive.css.
Hooks called: 226 (show)
Files included: 34 - 1306KB. (show)
Memory used: 1082KB.
Tokens: post-login.
Cache hits: 12: 0.00110s for 26,766 bytes (show)
Cache misses: 1: (show)
Queries used: 14.

[Show Queries]