<?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: XY Coordinate Lisp Leader Altering in Visual LISP, AutoLISP and General Customization Forum</title>
    <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/xy-coordinate-lisp-leader-altering/m-p/8458581#M95531</link>
    <description>&lt;P&gt;I hope this helps you.&lt;/P&gt;
&lt;P&gt;Let us know if it worked for you.&lt;/P&gt;
&lt;P&gt;Best regards, Luís Augusto&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;(defun c:xyz (/ pick1 pick2 &lt;STRONG&gt;&lt;FONT color="#000080"&gt;*error*&lt;/FONT&gt;&lt;/STRONG&gt;)&lt;BR /&gt;&lt;BR /&gt;&lt;STRONG&gt;&lt;FONT color="#333399"&gt; (defun *error* (msg)&lt;/FONT&gt;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;&lt;FONT color="#333399"&gt;   (setvar "osmode" UserOS)&lt;/FONT&gt;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;&lt;FONT color="#333399"&gt;   (setvar "cmdecho" 1)&lt;/FONT&gt;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;&lt;FONT color="#333399"&gt;   (princ)&lt;/FONT&gt;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;&lt;FONT color="#333399"&gt; )&lt;/FONT&gt;&lt;/STRONG&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;STRONG&gt; &lt;FONT color="#333399"&gt;(setq UserOS (getvar "osmode"))&lt;BR /&gt; (setvar "osmode" 1);put the osmode of your choice&lt;/FONT&gt;&lt;/STRONG&gt;&lt;BR /&gt; (setvar "cmdecho" 0)&lt;BR /&gt; &lt;BR /&gt; (setq Origin (getpoint "\nPick Origin for labels: "))&lt;BR /&gt;&lt;BR /&gt; (while&lt;BR /&gt;   (setq pick1 (getpoint "\nPick point to label &amp;lt;Enter to stop&amp;gt; :"))&lt;BR /&gt;   (setq pick2 (getpoint pick1 "\nPick leader end point :"))&lt;BR /&gt;   (setq Delx (- (car Pick1) (car Origin)))&lt;BR /&gt;   (setq Dely (- (cadr Pick1) (cadr Origin)))&lt;BR /&gt;   (command "._LEADER"&lt;BR /&gt;     pick1&lt;BR /&gt;     pick2&lt;BR /&gt;&lt;STRONG&gt;&lt;FONT color="#333399"&gt;     "_f"&lt;/FONT&gt;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;&lt;FONT color="#333399"&gt;     "_n"&lt;/FONT&gt;&lt;/STRONG&gt;&lt;BR /&gt;     "_Annotation"&lt;BR /&gt;     (strcat "X= " (rtos Delx 2 3))&lt;BR /&gt;     (strcat "Y= " (rtos Dely 2 3))&lt;BR /&gt;     ""&lt;BR /&gt;   )&lt;BR /&gt; )&lt;BR /&gt;&lt;BR /&gt; (setvar "osmode" UserOS)&lt;BR /&gt; (setvar "cmdecho" 1)&lt;BR /&gt; (princ)&lt;BR /&gt;)&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 11 Dec 2018 01:13:30 GMT</pubDate>
    <dc:creator>Luís Augusto</dc:creator>
    <dc:date>2018-12-11T01:13:30Z</dc:date>
    <item>
      <title>XY Coordinate Lisp Leader Altering</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/xy-coordinate-lisp-leader-altering/m-p/8458383#M95530</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I'm new to the group, and have been having an issue altering my code for my lisp to display x and y coordinates.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I currently am using this;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;(defun c:xyz (/ pick1 pick2)&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; (setvar "cmdecho" 0)&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; (setq Origin (getpoint "\nPick Origin for labels: "))&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; (while&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; (setq pick1 (getpoint "\nPick point to label &amp;lt;Enter to stop&amp;gt; :"))&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; (setq pick2 (getpoint pick1 "\nPick leader end point :"))&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; (setq Delx (- (car Pick1) (car Origin)))&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; (setq Dely (- (cadr Pick1) (cadr Origin)))&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;(command "._LEADER" pick1 pick2&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; "_Annotation"&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; (strcat "X= " (rtos Delx 2 3))&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; (strcat "Y= " (rtos Dely 2 3)) "" ) )&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; (setvar "osmode" UserOS)&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; (setvar "cmdecho" 1)&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; (princ) )&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Everything works perfectly, except I'd like the leader to not have an arrow at the end of it.&lt;/P&gt;
&lt;P&gt;Is there any way to alter the leader in the code above, or will i have to manually do it after?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks,&lt;/P&gt;</description>
      <pubDate>Mon, 10 Dec 2018 22:25:10 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/xy-coordinate-lisp-leader-altering/m-p/8458383#M95530</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-12-10T22:25:10Z</dc:date>
    </item>
    <item>
      <title>Re: XY Coordinate Lisp Leader Altering</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/xy-coordinate-lisp-leader-altering/m-p/8458581#M95531</link>
      <description>&lt;P&gt;I hope this helps you.&lt;/P&gt;
&lt;P&gt;Let us know if it worked for you.&lt;/P&gt;
&lt;P&gt;Best regards, Luís Augusto&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;(defun c:xyz (/ pick1 pick2 &lt;STRONG&gt;&lt;FONT color="#000080"&gt;*error*&lt;/FONT&gt;&lt;/STRONG&gt;)&lt;BR /&gt;&lt;BR /&gt;&lt;STRONG&gt;&lt;FONT color="#333399"&gt; (defun *error* (msg)&lt;/FONT&gt;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;&lt;FONT color="#333399"&gt;   (setvar "osmode" UserOS)&lt;/FONT&gt;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;&lt;FONT color="#333399"&gt;   (setvar "cmdecho" 1)&lt;/FONT&gt;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;&lt;FONT color="#333399"&gt;   (princ)&lt;/FONT&gt;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;&lt;FONT color="#333399"&gt; )&lt;/FONT&gt;&lt;/STRONG&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;STRONG&gt; &lt;FONT color="#333399"&gt;(setq UserOS (getvar "osmode"))&lt;BR /&gt; (setvar "osmode" 1);put the osmode of your choice&lt;/FONT&gt;&lt;/STRONG&gt;&lt;BR /&gt; (setvar "cmdecho" 0)&lt;BR /&gt; &lt;BR /&gt; (setq Origin (getpoint "\nPick Origin for labels: "))&lt;BR /&gt;&lt;BR /&gt; (while&lt;BR /&gt;   (setq pick1 (getpoint "\nPick point to label &amp;lt;Enter to stop&amp;gt; :"))&lt;BR /&gt;   (setq pick2 (getpoint pick1 "\nPick leader end point :"))&lt;BR /&gt;   (setq Delx (- (car Pick1) (car Origin)))&lt;BR /&gt;   (setq Dely (- (cadr Pick1) (cadr Origin)))&lt;BR /&gt;   (command "._LEADER"&lt;BR /&gt;     pick1&lt;BR /&gt;     pick2&lt;BR /&gt;&lt;STRONG&gt;&lt;FONT color="#333399"&gt;     "_f"&lt;/FONT&gt;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;&lt;FONT color="#333399"&gt;     "_n"&lt;/FONT&gt;&lt;/STRONG&gt;&lt;BR /&gt;     "_Annotation"&lt;BR /&gt;     (strcat "X= " (rtos Delx 2 3))&lt;BR /&gt;     (strcat "Y= " (rtos Dely 2 3))&lt;BR /&gt;     ""&lt;BR /&gt;   )&lt;BR /&gt; )&lt;BR /&gt;&lt;BR /&gt; (setvar "osmode" UserOS)&lt;BR /&gt; (setvar "cmdecho" 1)&lt;BR /&gt; (princ)&lt;BR /&gt;)&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 11 Dec 2018 01:13:30 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/xy-coordinate-lisp-leader-altering/m-p/8458581#M95531</guid>
      <dc:creator>Luís Augusto</dc:creator>
      <dc:date>2018-12-11T01:13:30Z</dc:date>
    </item>
    <item>
      <title>Re: XY Coordinate Lisp Leader Altering</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/xy-coordinate-lisp-leader-altering/m-p/8460542#M95532</link>
      <description>&lt;P&gt;Luis,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;That worked perfectly.&amp;nbsp; I had to alter the code slightly to remove the Osnap command at the beginning.&amp;nbsp; It was setting all of my snaps to off, which was causing an issue.&amp;nbsp; Nonetheless, everything else was perfect.&amp;nbsp; I do have one more question though, if you've possibly got a solution?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The output is currently reading stacked as such:&lt;/P&gt;
&lt;P&gt;X = 3.593&lt;/P&gt;
&lt;P&gt;y = 4.569&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Is there any way to get these on the same line to read as:&lt;/P&gt;
&lt;P&gt;X,Y = 3.593, 4.569&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;This would be ideal for my application.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks,&lt;/P&gt;
&lt;P&gt;Andrew&lt;/P&gt;</description>
      <pubDate>Tue, 11 Dec 2018 16:57:24 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/xy-coordinate-lisp-leader-altering/m-p/8460542#M95532</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-12-11T16:57:24Z</dc:date>
    </item>
    <item>
      <title>Re: XY Coordinate Lisp Leader Altering</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/xy-coordinate-lisp-leader-altering/m-p/8460634#M95533</link>
      <description>&lt;P&gt;Just change this...in&amp;nbsp;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/1944557"&gt;@Luís&amp;nbsp;Augusto&lt;/a&gt;&amp;nbsp;code&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;   (command "._LEADER"
     pick1
     pick2
     "_f"
     "_n"
     "_Annotation"
     (strcat "X,Y= " (rtos Delx 2 3) "," (rtos Dely 2 3))
     ""
   )&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 11 Dec 2018 17:21:36 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/xy-coordinate-lisp-leader-altering/m-p/8460634#M95533</guid>
      <dc:creator>dbhunia</dc:creator>
      <dc:date>2018-12-11T17:21:36Z</dc:date>
    </item>
    <item>
      <title>Re: XY Coordinate Lisp Leader Altering</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/xy-coordinate-lisp-leader-altering/m-p/8460685#M95534</link>
      <description>&lt;P&gt;Luis,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Scratch that, after some tinkering, I figured it out.&lt;/P&gt;
&lt;P&gt;But thank you again for all your help!!&lt;/P&gt;</description>
      <pubDate>Tue, 11 Dec 2018 17:36:27 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/xy-coordinate-lisp-leader-altering/m-p/8460685#M95534</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-12-11T17:36:27Z</dc:date>
    </item>
    <item>
      <title>Re: XY Coordinate Lisp Leader Altering</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/xy-coordinate-lisp-leader-altering/m-p/8460693#M95535</link>
      <description>&lt;P&gt;Dbhunia,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I actually figured it out and replied prior to seeing your comment.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Nonetheless, thanks for the speedy response and solution.&lt;/P&gt;
&lt;P&gt;I did exactly what you suggested.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Cheers!&lt;/P&gt;</description>
      <pubDate>Tue, 11 Dec 2018 17:40:10 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/xy-coordinate-lisp-leader-altering/m-p/8460693#M95535</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-12-11T17:40:10Z</dc:date>
    </item>
  </channel>
</rss>

