<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Arrow Leader LISP in Visual LISP, AutoLISP and General Customization Forum</title>
    <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/arrow-leader-lisp/m-p/11842660#M32729</link>
    <description>&lt;P&gt;Did not test it&amp;nbsp; but it seem that wrong type parentheses could be the culprit.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#FF0000"&gt;&lt;STRONG&gt; [&lt;/STRONG&gt;&lt;/FONT&gt;setq ar_ang (- ang 1.57)&lt;FONT color="#FF0000"&gt;&lt;STRONG&gt;] &lt;/STRONG&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Also, instead of 1.57 I would use (/ pi 2)&lt;/P&gt;</description>
    <pubDate>Thu, 23 Mar 2023 15:25:16 GMT</pubDate>
    <dc:creator>ВeekeeCZ</dc:creator>
    <dc:date>2023-03-23T15:25:16Z</dc:date>
    <item>
      <title>Arrow Leader LISP</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/arrow-leader-lisp/m-p/11842619#M32728</link>
      <description>&lt;P&gt;This was my first attempt at making a LISP routine for myself.&amp;nbsp; Everything works fine except for the fact that when I use a "Clockwise" motion to draw the arch the arrow comes in 180 degrees in the wrong direction.&amp;nbsp; Everything works fine when I draw it with a counter-clock wise motion.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm pretty sure this is a funky geometry thing but can any one help me troubleshoot this/improve what I have so far?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any comments about syntax and best practices would also be appreciated.&lt;/P&gt;</description>
      <pubDate>Thu, 23 Mar 2023 15:15:18 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/arrow-leader-lisp/m-p/11842619#M32728</guid>
      <dc:creator>ensomoran</dc:creator>
      <dc:date>2023-03-23T15:15:18Z</dc:date>
    </item>
    <item>
      <title>Re: Arrow Leader LISP</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/arrow-leader-lisp/m-p/11842660#M32729</link>
      <description>&lt;P&gt;Did not test it&amp;nbsp; but it seem that wrong type parentheses could be the culprit.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#FF0000"&gt;&lt;STRONG&gt; [&lt;/STRONG&gt;&lt;/FONT&gt;setq ar_ang (- ang 1.57)&lt;FONT color="#FF0000"&gt;&lt;STRONG&gt;] &lt;/STRONG&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Also, instead of 1.57 I would use (/ pi 2)&lt;/P&gt;</description>
      <pubDate>Thu, 23 Mar 2023 15:25:16 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/arrow-leader-lisp/m-p/11842660#M32729</guid>
      <dc:creator>ВeekeeCZ</dc:creator>
      <dc:date>2023-03-23T15:25:16Z</dc:date>
    </item>
    <item>
      <title>Re: Arrow Leader LISP</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/arrow-leader-lisp/m-p/11842719#M32730</link>
      <description>&lt;P&gt;While this was a mistake it seems to have not resolved the issue&lt;/P&gt;</description>
      <pubDate>Thu, 23 Mar 2023 15:37:47 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/arrow-leader-lisp/m-p/11842719#M32730</guid>
      <dc:creator>ensomoran</dc:creator>
      <dc:date>2023-03-23T15:37:47Z</dc:date>
    </item>
    <item>
      <title>Re: Arrow Leader LISP</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/arrow-leader-lisp/m-p/11842758#M32731</link>
      <description>&lt;P&gt;An arc is tricky, how about to use a polyline?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;(vl-load-com)

(defun c:artic nil

  (command "_pline" pause "_a" "_s" pause pause ""
	   "_.insert" "arrow" "_s" 1
	   "_r" (angtos (+ (/ pi 2) (angle (vlax-curve-getsecondderiv (entlast) (vlax-curve-getendparam (entlast))) '(0 0 0))) 0 6)
	   "_non" (getvar 'lastpoint))
  (princ)
  )
&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 23 Mar 2023 15:56:00 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/arrow-leader-lisp/m-p/11842758#M32731</guid>
      <dc:creator>ВeekeeCZ</dc:creator>
      <dc:date>2023-03-23T15:56:00Z</dc:date>
    </item>
    <item>
      <title>Re: Arrow Leader LISP</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/arrow-leader-lisp/m-p/11842764#M32732</link>
      <description>&lt;P&gt;Just in terms of format:&lt;/P&gt;
&lt;P&gt;....&lt;BR /&gt;&lt;FONT size="4" color="#FF0000"&gt;&lt;STRONG&gt;(&lt;/STRONG&gt;&lt;/FONT&gt;if (&amp;lt;= &lt;FONT size="4"&gt;&lt;STRONG&gt;&lt;FONT color="#FF0000"&gt;ang&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/FONT&gt; 1.57&lt;FONT size="4"&gt;&lt;STRONG&gt;&lt;FONT color="#FF0000"&gt;)&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT color="#FF0000"&gt;&lt;FONT size="2" color="#00CCFF"&gt;; parentheses issues; not &lt;EM&gt;ar_ang&lt;/EM&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;BR /&gt;&amp;nbsp; (setq ar_ang (+ ang 1.57))&lt;FONT size="4"&gt;&lt;STRONG&gt;&lt;FONT color="#FF0000"&gt;&lt;FONT size="2" color="#00CCFF"&gt;;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT color="#FF0000"&gt;&lt;FONT size="2" color="#00CCFF"&gt; then&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;STRONG&gt;&lt;FONT color="#FF0000"&gt;&amp;nbsp; &lt;FONT size="4"&gt;(&lt;/FONT&gt;&lt;/FONT&gt;&lt;/STRONG&gt;setq ar_ang (- ang 1.57)&lt;FONT size="4"&gt;&lt;STRONG&gt;&lt;FONT color="#FF0000"&gt;)&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT color="#FF0000"&gt;&lt;FONT size="2" color="#00CCFF"&gt;; else -- parentheses, not brackets&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;BR /&gt;)&lt;BR /&gt;....&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;But I don't think what you really want to test is whether the angle from the center to an end is &amp;lt;= 90°.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;And I agree, (/ pi 2) is better than 1.57, however small the difference.&lt;/P&gt;</description>
      <pubDate>Thu, 23 Mar 2023 16:02:57 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/arrow-leader-lisp/m-p/11842764#M32732</guid>
      <dc:creator>Kent1Cooper</dc:creator>
      <dc:date>2023-03-23T16:02:57Z</dc:date>
    </item>
    <item>
      <title>Re: Arrow Leader LISP</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/arrow-leader-lisp/m-p/11842792#M32733</link>
      <description>&lt;P&gt;...or the arc version with your/Kent's ang calculation.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;(vl-load-com)

(defun c:artic ( / ang)

  (command "_.arc" pause pause pause)
  (setq ang (angle (vlax-curve-getsecondderiv (entlast) (vlax-curve-getparamatpoint (entlast) (getvar 'lastpoint))) '(0 0 0))
	ang (+ ang pi (/ pi (if (&amp;lt;= ang (/ pi 2)) 2 -2))))
  (command "_.insert" "arrow" "_s" 1
	   "_r" (angtos ang 0 6)
	   "_non" (getvar 'lastpoint))
  (princ)
  )
&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 23 Mar 2023 16:08:55 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/arrow-leader-lisp/m-p/11842792#M32733</guid>
      <dc:creator>ВeekeeCZ</dc:creator>
      <dc:date>2023-03-23T16:08:55Z</dc:date>
    </item>
    <item>
      <title>Re: Arrow Leader LISP</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/arrow-leader-lisp/m-p/11842806#M32734</link>
      <description>&lt;P&gt;Yeah I know the Pline would be easier but the standard we use at my company is an arch for the end of branch circuits on drawings.&amp;nbsp; When the arrows are not tangent to the end of the arch it pisses some people off.&lt;/P&gt;</description>
      <pubDate>Thu, 23 Mar 2023 16:01:25 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/arrow-leader-lisp/m-p/11842806#M32734</guid>
      <dc:creator>ensomoran</dc:creator>
      <dc:date>2023-03-23T16:01:25Z</dc:date>
    </item>
    <item>
      <title>Re: Arrow Leader LISP</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/arrow-leader-lisp/m-p/11842811#M32735</link>
      <description>&lt;P&gt;See&amp;nbsp;&lt;A href="https://www.autodesk.com/autodesk-university/class/Which-Editor-Use-AutoLISP-Development-Notepad-Visual-Studio-Code-2020#video" target="_blank" rel="noopener"&gt;THIS&lt;/A&gt;&amp;nbsp;how to use a VLIDE for debugging.&lt;/P&gt;</description>
      <pubDate>Thu, 23 Mar 2023 16:03:14 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/arrow-leader-lisp/m-p/11842811#M32735</guid>
      <dc:creator>ВeekeeCZ</dc:creator>
      <dc:date>2023-03-23T16:03:14Z</dc:date>
    </item>
    <item>
      <title>Re: Arrow Leader LISP</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/arrow-leader-lisp/m-p/11842828#M32736</link>
      <description>&lt;P&gt;I think this one better than my code because it lets me see the arch before its placed but I have not idea how this one works.&amp;nbsp; It also still has the same issues as my original code, the arrow is 180 degrees off of when you draw it clockwise.&lt;/P&gt;</description>
      <pubDate>Thu, 23 Mar 2023 16:08:53 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/arrow-leader-lisp/m-p/11842828#M32736</guid>
      <dc:creator>ensomoran</dc:creator>
      <dc:date>2023-03-23T16:08:53Z</dc:date>
    </item>
    <item>
      <title>Re: Arrow Leader LISP</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/arrow-leader-lisp/m-p/11842852#M32737</link>
      <description>&lt;P&gt;I see... I did not test it well.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;So lets get back to a pline which... does not require that silly ang calculation.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;(vl-load-com)

(defun c:artic (/ ent)

  (command "_pline" pause "_a" "_s" pause pause ""
	   "_.insert" "arrow" "_s" 1
	   "_r" (angtos (+ (/ pi 2) (angle (vlax-curve-getsecondderiv (setq ent (entlast)) (vlax-curve-getendparam (entlast))) '(0 0 0))) 0 6)
	   "_non" (getvar 'lastpoint)
	   "._explode" ent)
  (princ)
  )
&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 23 Mar 2023 16:18:09 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/arrow-leader-lisp/m-p/11842852#M32737</guid>
      <dc:creator>ВeekeeCZ</dc:creator>
      <dc:date>2023-03-23T16:18:09Z</dc:date>
    </item>
    <item>
      <title>Re: Arrow Leader LISP</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/arrow-leader-lisp/m-p/11842855#M32738</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/69526"&gt;@Kent1Cooper&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;....&lt;/P&gt;
&lt;P&gt;But I don't think what you really want to test is whether the angle from the center to an end is &amp;lt;= 90°.&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;....&lt;/SPAN&gt;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;If you're willing to be restricted to drawing the Arc by 3 points [not some of the other optional ways, which could involve different numbers of inputs, or result in a different ending direction], you can avoid the need to check for the angle, and the problem of the Arc's information always being stored as if it was drawn CCW, and which way you actually drew it, and finding its center, and saving points to variables, and all that, by using the &lt;STRONG&gt;LASTANGLE&lt;/STRONG&gt; System Variable.&amp;nbsp; Try this:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#000000"&gt;&lt;STRONG&gt;&lt;FONT face="courier new,courier"&gt;(defun C:ARTIC ()&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#000000"&gt;&lt;STRONG&gt;&lt;FONT face="courier new,courier"&gt;&amp;nbsp; (prompt "\nDraw 3-point Arc:\n")&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#000000"&gt;&lt;STRONG&gt;&lt;FONT face="courier new,courier"&gt;&amp;nbsp; (command&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#000000"&gt;&lt;STRONG&gt;&lt;FONT face="courier new,courier"&gt;&amp;nbsp; &amp;nbsp; "_.arc" pause pause pause&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#000000"&gt;&lt;STRONG&gt;&lt;FONT face="courier new,courier"&gt;&amp;nbsp; &amp;nbsp; "_.insert" "ARROW" "@" "" "" (cvunit (getvar 'lastangle) "radian" "degree")&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#000000"&gt;&lt;STRONG&gt;&lt;FONT face="courier new,courier"&gt;&amp;nbsp; )&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#000000"&gt;&lt;STRONG&gt;&lt;FONT face="courier new,courier"&gt;)&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Kent1Cooper_0-1679588397715.png" style="width: 600px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1192625i796572E00E07585F/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Kent1Cooper_0-1679588397715.png" alt="Kent1Cooper_0-1679588397715.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 23 Mar 2023 16:26:09 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/arrow-leader-lisp/m-p/11842855#M32738</guid>
      <dc:creator>Kent1Cooper</dc:creator>
      <dc:date>2023-03-23T16:26:09Z</dc:date>
    </item>
    <item>
      <title>Re: Arrow Leader LISP</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/arrow-leader-lisp/m-p/11842891#M32739</link>
      <description>&lt;P&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/69526"&gt;@Kent1Cooper&lt;/a&gt;&amp;nbsp;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/1779365"&gt;@ВeekeeCZ&lt;/a&gt;&amp;nbsp;Thank you both of these work just fine, I need to study these a little to really understand whats going on but this helps a lot.&amp;nbsp;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 23 Mar 2023 16:30:14 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/arrow-leader-lisp/m-p/11842891#M32739</guid>
      <dc:creator>ensomoran</dc:creator>
      <dc:date>2023-03-23T16:30:14Z</dc:date>
    </item>
    <item>
      <title>Re: Arrow Leader LISP</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/arrow-leader-lisp/m-p/11842912#M32740</link>
      <description>&lt;P&gt;The LASTANGLE approach will also work after drawing it as a Polyline of one arc segment, rather than calculating angles by derivatives and parameters in (vlax-curve....) functions, etc.&amp;nbsp; But if it's going to be drawn by 3 points, and end up Exploded into a regular Arc anyway, it doesn't seem worth drawing it as a Polyline in the first place.&lt;/P&gt;</description>
      <pubDate>Thu, 23 Mar 2023 16:38:19 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/arrow-leader-lisp/m-p/11842912#M32740</guid>
      <dc:creator>Kent1Cooper</dc:creator>
      <dc:date>2023-03-23T16:38:19Z</dc:date>
    </item>
  </channel>
</rss>

