<?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: show line direction in Visual LISP, AutoLISP and General Customization Forum</title>
    <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/show-line-direction/m-p/9825384#M68610</link>
    <description>&lt;P&gt;@Anonymous&amp;nbsp;,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;OK - hope this is final&amp;nbsp;&lt;span class="lia-unicode-emoji" title=":face_screaming_in_fear:"&gt;😱&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;the prompt has two options: Show and Reverse. when reverse, the arrow flip to the other size of the line but the arrow is on the right Azimuth so 'bear' me&amp;nbsp;&lt;span class="lia-unicode-emoji" title=":grinning_face:"&gt;😀&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;enjoy&lt;/P&gt;&lt;P&gt;Moshe&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="general"&gt;(defun c:lid (/ combine_selection line_reverse main_exe ; local functions
                ss0 ss1 action)

 (defun combine_selection (/ i)
  (setq i -1) 
  (repeat (sslength ss1)
   (setq ename (ssname ss1 (setq i (1+ i))))

   (if (not (ssmemb ename ss0))
    (ssadd ename ss0)
   )
  ); repeat
 ); combine_selection
  
  
 (defun line_reverse (ss / elist p0 p1)
  (foreach ename (vl-remove-if 'listp (mapcar 'cadr (ssnamex ss)))
   (setq elist (entget ename))
   (setq p0 (cdr (assoc '10 elist)) p1 (cdr (assoc '11 elist)))
   (setq elist (subst (cons '10 p1) (assoc '10 elist) elist)) 
   (setq elist (subst (cons '11 p0) (assoc '11 elist) elist)) 
   (entmod elist)
  ); foreach
 ); line_reverse


 (defun main_exe (ss / gen_dist wcs-&amp;gt;ucs ; local functions
                       arrow_size ename elist p0 p1 p2 p3 p4 p5 p6 p7 p8)
  (defun gen_dist ()
   (mapcar
    '(lambda (ename / elist)
      (setq elist (entget ename))
      (distance (cdr (assoc '10 elist)) (cdr (assoc '11 elist))) 
     ); lambda
    (vl-remove-if 'listp (mapcar 'cadr (ssnamex ss0)))
   ); mapcar
  ); gen_dist

   
  (defun wcs-&amp;gt;ucs (pt)
   (trans pt 0 1)
  )
   
  (setq arrow_size (* (/ 1.0 4.0) (/ (apply '+ (gen_dist)) (vl-list-length (gen_dist)))))
   
  (foreach ename (vl-remove-if 'listp (mapcar 'cadr (ssnamex ss)))
   (setq elist (entget ename))
   (setq p0 (cdr (assoc '10 elist)))
   (setq p1 (cdr (assoc '11 elist)))
     
   (if (&amp;gt; (* (distance p0 p1) 0.75) (* 2 0.4 arrow_size))
    (progn
     (setq p2 (polar p0 (angle p0 p1) (/ (distance p0 p1) 2)))

     (setq p3 (polar p2 (angle p1 p0) (* 0.40 arrow_size)))
     (setq p4 (polar p2 (angle p0 p1) (* 0.40 arrow_size)))

     (setq p5 (polar p3 (+ (angle p0 p1) (/ pi 2)) (* 0.30 arrow_size)))
     (setq p6 (polar p4 (+ (angle p0 p1) (/ pi 2)) (* 0.30 arrow_size)))

     (setq p7 (polar p6 (- (angle p6 p5) (/ pi 6)) (* 0.25 arrow_size)))
     (setq p8 (polar p6 (+ (angle p6 p5) (/ pi 6)) (* 0.25 arrow_size)))

     (grvecs (list 3 (wcs-&amp;gt;ucs p5) (wcs-&amp;gt;ucs p6)
                   3 (wcs-&amp;gt;ucs p7) (wcs-&amp;gt;ucs p6)
                   3 (wcs-&amp;gt;ucs p6) (wcs-&amp;gt;ucs p8)))
    ); progn
   ); if
  ); foreach
 ); main_exe

  
 ; here start c:LID
 (setq ss0 (ssadd))
   
 (while (and
           (not (initget "Show Reverse"))
           (setq action (getkword "\nShow/Reverse: "))
           (setq ss1 (ssget '((0 . "line"))))
        )
  (redraw)
  
  (cond
   ((eq action "Show")
    (combine_selection)
    (main_exe ss0)
   ); case
   ((eq action "Reverse")
    (line_reverse ss1) 
    (combine_selection)
    (main_exe ss0)
   ); case
  ); cond
 ); while
  
 (princ)
); c:LID&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 26 Oct 2020 18:38:40 GMT</pubDate>
    <dc:creator>Moshe-A</dc:creator>
    <dc:date>2020-10-26T18:38:40Z</dc:date>
    <item>
      <title>show line direction</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/show-line-direction/m-p/9822361#M68591</link>
      <description>&lt;P&gt;Hi everyone,&lt;/P&gt;&lt;P&gt;can you help with a lisp that shows the direction of selected &lt;STRONG&gt;lines&lt;/STRONG&gt;,&lt;/P&gt;&lt;P&gt;like this lisp for polyline:&lt;/P&gt;&lt;P&gt;&lt;A href="https://autocadtips1.com/2014/06/24/autolisp-polyline-direction-preview/#:~:text=You%20simply%20run%20the%20command,the%20direction%20of%20the%20polyline." target="_blank" rel="noopener"&gt;https://autocadtips1.com/2014/06/24/autolisp-polyline-direction-preview/#:~:text=You%20simply%20run%20the%20command,the%20direction%20of%20the%20polyline.&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;and also ask for lines to change direction if needed.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;It would be very helpfull.&lt;/P&gt;&lt;P&gt;Thank you&lt;/P&gt;&lt;P&gt;Eyal.&lt;/P&gt;</description>
      <pubDate>Sat, 24 Oct 2020 17:24:50 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/show-line-direction/m-p/9822361#M68591</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-10-24T17:24:50Z</dc:date>
    </item>
    <item>
      <title>Re: show line direction</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/show-line-direction/m-p/9822391#M68592</link>
      <description>&lt;P&gt;Here you have two functions linedirections and clearcircles.&lt;/P&gt;&lt;P&gt;First creates circles of radius 5 at the end point.&lt;/P&gt;&lt;P&gt;Second erase all circles.&lt;/P&gt;&lt;P&gt;To reverse direction of a line use built in command REVERSE&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="general"&gt;(defun c:linedirections nil (linedirections))
(defun c:clearcircles nil(clearcircles))

(defun linedirections ( / ss pt i)
(princ "\nSelect lines objects to show it end point &amp;gt;")
(setq ss (ssget '((0 . "LINE"))))
(setvar 'cmdecho 0)
(setq ssd (ssadd) i 0)
(if ss 
	(repeat (sslength ss)
	(setq pt (cdr (assoc 11 (entget (ssname ss i)))))
	(command "circle" pt 5 )	
	(setq ssd (ssadd (entlast) ssd))
	(setq i (+ i 1))
	)
)
(setvar 'cmdecho 1)
(princ)
)
(defun clearcircles () (command "erase" ssd "")(princ))&lt;/LI-CODE&gt;</description>
      <pubDate>Sat, 24 Oct 2020 18:25:54 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/show-line-direction/m-p/9822391#M68592</guid>
      <dc:creator>hak_vz</dc:creator>
      <dc:date>2020-10-24T18:25:54Z</dc:date>
    </item>
    <item>
      <title>Re: show line direction</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/show-line-direction/m-p/9822482#M68593</link>
      <description>&lt;P&gt;Eyal,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Check this one, it allows you to control the arrows direction.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The next code line defines the base arrow size which is the 1/4 the average distance of all selected lines.&lt;/P&gt;&lt;P&gt;you can set a bigger arrow by changing 0.25 to a higher value.&lt;/P&gt;&lt;P&gt;(setq ARROW_SIZE (* 0.25 (/ (apply '+ (gen_dist)) (vl-list-length (gen_dist)))))&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Remember that the green arrows are drawn only on the AutoCAD graphic screen and be vanished with redraw (or any other zoom commands)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;enjoy&lt;/P&gt;&lt;P&gt;Moshe&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="general"&gt;(defun c:lid (/ initialize askdir gen_dist direction ; local functions
                ss ARROW_SIZE elist p0 p1 p2 p3 p4 p5 p6 p7 p8)

 (defun initialize ()
  (if (eq (getvar "users5") "")
   (setq defdir (setvar "users5" "Forward"))
   (setq defdir (getvar "users5"))
  )
 ); initialize

  
 (defun askdir (def / ask)
  (initget "Forward Backward")

  (if (not (setq ask (getkword (strcat "\nForward/Backward arrowhead &amp;lt;" (substr def 1 1) "&amp;gt;: "))))
   (setq ask def)
   (setq def ask)
  )
 ); askdir
  
  
 (defun gen_dist ()
  (mapcar
   '(lambda (ename / elist)
     (setq elist (entget ename))
     (distance (cdr (assoc '10 elist)) (cdr (assoc '11 elist))) 
    ); lambda
   (vl-remove-if 'listp (mapcar 'cadr (ssnamex ss)))
  ); mapcar
 ); gen_dist  


 (defun direction (ang)
  (if (eq arrdir "Forward")
   ang
   (+ ang pi)
  )
 ); direction

  
 ; here start c:LID
 (initialize)
   
 (if (and
       (setvar "users5" (setq arrdir (askdir defdir)))      
       (setq ss (ssget '((0 . "line"))))
     )
  (progn
   (setq ARROW_SIZE (* 0.25 (/ (apply '+ (gen_dist)) (vl-list-length (gen_dist)))))
   
   (foreach ename (vl-remove-if 'listp (mapcar 'cadr (ssnamex ss)))
    (setq elist (entget ename))
    (setq p0 (cdr (assoc '10 elist)))
    (setq p1 (cdr (assoc '11 elist)))
    (setq p2 (polar p0 (angle p0 p1) (/ (distance p0 p1) 2)))

    (setq p3 (polar p2 (direction (angle p1 p0)) (* 0.50 ARROW_SIZE)))
    (setq p4 (polar p2 (direction (angle p0 p1)) (* 0.50 ARROW_SIZE)))

    (setq p5 (polar p3 (direction (direction (+ (angle p0 p1) (/ pi 2)))) (* 0.30 ARROW_SIZE)))
    (setq p6 (polar p4 (direction (direction (+ (angle p0 p1) (/ pi 2)))) (* 0.30 ARROW_SIZE)))

    (setq p7 (polar p6 (- (angle p6 p5) (/ pi 6)) (* 0.25 ARROW_SIZE)))
    (setq p8 (polar p6 (+ (angle p6 p5) (/ pi 6)) (* 0.25 ARROW_SIZE)))

    (grvecs (list 3 p5 p6 3 p7 p6 3 p6 p8))
   ); foreach
  ); progn 
 ); if
  
 (princ)
); c:LID&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 24 Oct 2020 20:22:08 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/show-line-direction/m-p/9822482#M68593</guid>
      <dc:creator>Moshe-A</dc:creator>
      <dc:date>2020-10-24T20:22:08Z</dc:date>
    </item>
    <item>
      <title>Re: show line direction</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/show-line-direction/m-p/9822529#M68594</link>
      <description>&lt;P&gt;@Anonymous&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here is a bit updated code, now you just have to use command &lt;STRONG&gt;&lt;FONT color="#FF0000"&gt;linedirections&lt;/FONT&gt;&lt;/STRONG&gt;.&lt;/P&gt;&lt;P&gt;To delete circles run command again without selecting anything.&lt;/P&gt;&lt;P&gt;Circles are created with radius 15% of average line length.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="general"&gt;(defun c:linedirections nil (linedirections))
(defun linedirections ( / ss pt i tot)
(if ssd (command "erase" "multiple" ssd ""))
(princ "\nSelect lines objects to show it end point &amp;gt;")
(setq ss (ssget '((0 . "LINE"))) ssd (ssadd) i 0 tot 0)
(setvar 'cmdecho 0)
	(if ss 
		(progn
			(repeat (sslength ss)(setq tot (+ tot (vlax-get (vlax-ename-&amp;gt;vla-object (ssname ss i)) 'Length)) i (+ i 1)))
			(setq tot (* 0.05 (/ tot (sslength ss))) i 0)
			(repeat (sslength ss)
				(setq pt (vlax-get (vlax-ename-&amp;gt;vla-object (ssname ss i)) 'EndPoint))
				(command "circle" pt tot)	
				(setq ssd (ssadd (entlast) ssd))
				(setq i (+ i 1))
			)
		)
	)
(setvar 'cmdecho 1)
(princ "\nDone")
(princ)
)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 24 Oct 2020 21:35:19 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/show-line-direction/m-p/9822529#M68594</guid>
      <dc:creator>hak_vz</dc:creator>
      <dc:date>2020-10-24T21:35:19Z</dc:date>
    </item>
    <item>
      <title>Re: show line direction</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/show-line-direction/m-p/9822552#M68595</link>
      <description>&lt;P&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/52747"&gt;@Moshe-A&lt;/a&gt;&amp;nbsp;&amp;nbsp;:&lt;/P&gt;
&lt;P&gt;grvecs is so cool.&amp;nbsp; Years ago I built a LABEL_IT routine for labeling bearings and distances and curve data using grread and what I call glyphs to show endpoints (plural), direction, etc. as you just moved your pointer over a curve object even if nested in a block or xref.&amp;nbsp; I had both a glyph and an unglyph function.&lt;/P&gt;</description>
      <pubDate>Sat, 24 Oct 2020 22:23:44 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/show-line-direction/m-p/9822552#M68595</guid>
      <dc:creator>john.uhden</dc:creator>
      <dc:date>2020-10-24T22:23:44Z</dc:date>
    </item>
    <item>
      <title>Re: show line direction</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/show-line-direction/m-p/9822731#M68596</link>
      <description>&lt;P&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/3930636"&gt;@john.uhden&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;thank you&lt;/P&gt;</description>
      <pubDate>Sun, 25 Oct 2020 05:09:29 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/show-line-direction/m-p/9822731#M68596</guid>
      <dc:creator>Moshe-A</dc:creator>
      <dc:date>2020-10-25T05:09:29Z</dc:date>
    </item>
    <item>
      <title>Re: show line direction</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/show-line-direction/m-p/9822734#M68597</link>
      <description>&lt;P&gt;Eyal,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This version also supports ucs (rotate about Z axis).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Good morning&lt;/P&gt;&lt;P&gt;Moshe&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="general"&gt;(defun c:lid (/ initialize askdir gen_dist direction wcs-&amp;gt;ucs ; local functions
                defdir arrdir ss ARROW_SIZE elist p0 p1 p2 p3 p4 p5 p6 p7 p8)

 (defun initialize ()
  (if (eq (getvar "users5") "")
   (setq defdir (setvar "users5" "Forward"))
   (setq defdir (getvar "users5"))
  )
 ); initialize
  
 (defun askdir (def / ask)
  (initget "Forward Backward")

  (if (not (setq ask (getkword (strcat "\nForward/Backward arrowhead &amp;lt;" def "&amp;gt;: "))))
   (setq ask def)
   (setq def ask)
  )
 ); askdir
   
 (defun gen_dist ()
  (mapcar
   '(lambda (ename / elist)
     (setq elist (entget ename))
     (distance (cdr (assoc '10 elist)) (cdr (assoc '11 elist))) 
    ); lambda
   (vl-remove-if 'listp (mapcar 'cadr (ssnamex ss)))
  ); mapcar
 ); gen_dist  


 (defun direction (ang)
  (if (eq arrdir "Forward")
   ang
   (+ ang pi)
  )
 ); direction

 (defun wcs-&amp;gt;ucs (pt)
  (trans pt 0 1)
 )
   
 ; here start c:LID
 (initialize)
   
 (if (and
       (setvar "users5" (setq arrdir (askdir defdir)))      
       (setq ss (ssget '((0 . "line"))))
     )
  (progn
   (setq ARROW_SIZE (* (/ 1.0 4.0) (/ (apply '+ (gen_dist)) (vl-list-length (gen_dist)))))
   
   (foreach ename (vl-remove-if 'listp (mapcar 'cadr (ssnamex ss)))
    (setq elist (entget ename))
    (setq p0 (cdr (assoc '10 elist)))
    (setq p1 (cdr (assoc '11 elist)))
    (setq p2 (polar p0 (angle p0 p1) (/ (distance p0 p1) 2)))

    (setq p3 (polar p2 (direction (angle p1 p0)) (* 0.50 ARROW_SIZE)))
    (setq p4 (polar p2 (direction (angle p0 p1)) (* 0.50 ARROW_SIZE)))

    (setq p5 (polar p3 (direction (direction (+ (angle p0 p1) (/ pi 2)))) (* 0.30 ARROW_SIZE)))
    (setq p6 (polar p4 (direction (direction (+ (angle p0 p1) (/ pi 2)))) (* 0.30 ARROW_SIZE)))

    (setq p7 (polar p6 (- (angle p6 p5) (/ pi 6)) (* 0.25 ARROW_SIZE)))
    (setq p8 (polar p6 (+ (angle p6 p5) (/ pi 6)) (* 0.25 ARROW_SIZE)))

    (grvecs (list 3 (wcs-&amp;gt;ucs p5) (wcs-&amp;gt;ucs p6)
                  3 (wcs-&amp;gt;ucs p7) (wcs-&amp;gt;ucs p6)
                  3 (wcs-&amp;gt;ucs p6) (wcs-&amp;gt;ucs p8)))
   ); foreach
  ); progn 
 ); if
  
 (princ)
); c:LID
&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 25 Oct 2020 05:26:08 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/show-line-direction/m-p/9822734#M68597</guid>
      <dc:creator>Moshe-A</dc:creator>
      <dc:date>2020-10-25T05:26:08Z</dc:date>
    </item>
    <item>
      <title>Re: show line direction</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/show-line-direction/m-p/9822775#M68598</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/52747"&gt;@Moshe-A&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;It is great! it shows the arrow direction.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can you please add one more thing to it?&amp;nbsp;&lt;/P&gt;&lt;P&gt;that after the lisp will ask to &lt;STRONG&gt;show&lt;/STRONG&gt; the direction or to change the direction:&lt;/P&gt;&lt;P&gt;1. it will allow selecting the entities, and it will show the arrows as you did.&lt;/P&gt;&lt;P&gt;2. it will allow selecting the entities that need to be changed and reverse their direction.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;That will be wonderful.&lt;/P&gt;&lt;P&gt;Thank you!&lt;/P&gt;</description>
      <pubDate>Sun, 25 Oct 2020 06:31:36 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/show-line-direction/m-p/9822775#M68598</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-10-25T06:31:36Z</dc:date>
    </item>
    <item>
      <title>Re: show line direction</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/show-line-direction/m-p/9822788#M68599</link>
      <description>&lt;P&gt;@Anonymous&amp;nbsp;&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;HR /&gt;@Anonymous&amp;nbsp;wrote:&lt;BR /&gt;&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/52747"&gt;@Moshe-A&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;It is great! it shows the arrow direction.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can you please add one more thing to it?&amp;nbsp;&lt;/P&gt;&lt;P&gt;that after the lisp will ask to &lt;STRONG&gt;show&lt;/STRONG&gt; the direction or to change the direction:&lt;/P&gt;&lt;P&gt;1. it will allow selecting the entities, and it will show the arrows as you did.&lt;/P&gt;&lt;P&gt;2. it will allow selecting the entities that need to be changed and reverse their direction.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;That will be wonderful.&lt;/P&gt;&lt;P&gt;Thank you!&lt;/P&gt;&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;With &lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/52747"&gt;@Moshe-A&lt;/a&gt;&amp;nbsp; code, After you show line directions use command reverse. As long as you don't change view (zoom in out or move) arrows will be displayed.&lt;/P&gt;</description>
      <pubDate>Sun, 25 Oct 2020 07:24:49 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/show-line-direction/m-p/9822788#M68599</guid>
      <dc:creator>hak_vz</dc:creator>
      <dc:date>2020-10-25T07:24:49Z</dc:date>
    </item>
    <item>
      <title>Re: show line direction</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/show-line-direction/m-p/9823043#M68600</link>
      <description>&lt;P&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/5530556"&gt;@hak_vz&lt;/a&gt;&amp;nbsp;:&lt;/P&gt;
&lt;P&gt;That's the beauty of using grread for all input.&amp;nbsp; In a continuous while loop, even just moving the mouse will allow the code to pick up any changes in viewsize and viewctr to redraw glyphs accordingly.&amp;nbsp; Plus, you get control over the Esc key so that your code can stop one action but continue with another.&lt;/P&gt;</description>
      <pubDate>Sun, 25 Oct 2020 13:38:16 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/show-line-direction/m-p/9823043#M68600</guid>
      <dc:creator>john.uhden</dc:creator>
      <dc:date>2020-10-25T13:38:16Z</dc:date>
    </item>
    <item>
      <title>Re: show line direction</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/show-line-direction/m-p/9823178#M68601</link>
      <description>&lt;P&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/3930636"&gt;@john.uhden&lt;/a&gt;&amp;nbsp; I agree. Gr... functions offer a lot of new options, but in some situations simple solutions with global selection set variable that resets&amp;nbsp; on function start also good option. I could have included reverse option added inside my code but didn't. Function of the code is to show direction i.e end point of line object, and after that user can do what ever he wants from exploiting that information (delete, change property or something else)&lt;/P&gt;</description>
      <pubDate>Sun, 25 Oct 2020 16:29:16 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/show-line-direction/m-p/9823178#M68601</guid>
      <dc:creator>hak_vz</dc:creator>
      <dc:date>2020-10-25T16:29:16Z</dc:date>
    </item>
    <item>
      <title>Re: show line direction</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/show-line-direction/m-p/9823335#M68602</link>
      <description>&lt;P&gt;Eyal,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Now you are going out of the frame from the initial request cause i'm not sure if you understand the meaning of&amp;nbsp; writing only to AutoCAD graphics screen? (that's how your sample lisp works)&amp;nbsp;i came to this conclusion from your new request...&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;You want the first time to draw the arrows normally (forward) than pause and let you flip direction plus let you to select only the lines that need to be arrow flip direction and in order to do that the program must REDRAW\REGEN&amp;nbsp;&lt;/P&gt;&lt;P&gt;AutoCAD screen which will clear all existing arrows and the flip result will arrow only the latest lines.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is this what you had in mind in the first place?&lt;/P&gt;&lt;P&gt;(cause keeping the arrows&amp;nbsp;&lt;SPAN&gt;permanently is another program)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Moshe&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 25 Oct 2020 19:14:27 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/show-line-direction/m-p/9823335#M68602</guid>
      <dc:creator>Moshe-A</dc:creator>
      <dc:date>2020-10-25T19:14:27Z</dc:date>
    </item>
    <item>
      <title>Re: show line direction</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/show-line-direction/m-p/9823404#M68603</link>
      <description>&lt;P&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/5530556"&gt;@hak_vz&lt;/a&gt;&amp;nbsp;:&lt;/P&gt;
&lt;P&gt;I'm sorry.&amp;nbsp; I had no intent to imply fault to any of you brainiacs.&amp;nbsp; I admire you all.&amp;nbsp; I was just trying to point out that AutoLisp has some really nifty functions that make using it more fun as well as productive.&amp;nbsp; Grread is special to me because it can capture every key stroke and pointer activity.&amp;nbsp; It makes for a lot more code, but AutoCAD seems to react to it quite quickly.&amp;nbsp; Please continue to share your valuable wisdom as you do seemingly a multitude of times per week.&lt;/P&gt;</description>
      <pubDate>Sun, 25 Oct 2020 20:57:00 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/show-line-direction/m-p/9823404#M68603</guid>
      <dc:creator>john.uhden</dc:creator>
      <dc:date>2020-10-25T20:57:00Z</dc:date>
    </item>
    <item>
      <title>Re: show line direction</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/show-line-direction/m-p/9823409#M68604</link>
      <description>@Anonymous_A:&lt;BR /&gt;I see a note in my old program that a (redraw) is delayed.  Instead I found&lt;BR /&gt;it better to perform grvecs through the same points with color 0.</description>
      <pubDate>Sun, 25 Oct 2020 21:05:35 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/show-line-direction/m-p/9823409#M68604</guid>
      <dc:creator>john.uhden</dc:creator>
      <dc:date>2020-10-25T21:05:35Z</dc:date>
    </item>
    <item>
      <title>Re: show line direction</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/show-line-direction/m-p/9824133#M68605</link>
      <description>&lt;P&gt;wow&amp;nbsp;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/3930636"&gt;@john.uhden&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;That seems to be briliant &lt;SPAN&gt;solution&lt;/SPAN&gt; (slipped my mind) but i'm still waiting for the&amp;nbsp;@Anonymous&amp;nbsp;&amp;nbsp;to respond cause i'm not sure he wants the (grvecs). thought may be to replace the arrows to blocks and connect each line to it's block&amp;nbsp; with xdata?!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;thank you&lt;/P&gt;&lt;P&gt;Moshe&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 26 Oct 2020 10:18:58 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/show-line-direction/m-p/9824133#M68605</guid>
      <dc:creator>Moshe-A</dc:creator>
      <dc:date>2020-10-26T10:18:58Z</dc:date>
    </item>
    <item>
      <title>Re: show line direction</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/show-line-direction/m-p/9824149#M68606</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/52747"&gt;@Moshe-A&lt;/a&gt;&amp;nbsp;and&amp;nbsp;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/3930636"&gt;@john.uhden&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you for your brilliant suggestions, the lisp&amp;nbsp;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/52747"&gt;@Moshe-A&lt;/a&gt;&amp;nbsp; sent is almost what I wanted, I will try to explain myself better:&lt;/P&gt;&lt;P&gt;I want - when calling the lisp&lt;/P&gt;&lt;P&gt;1. it will ask - show or change line direction.&lt;/P&gt;&lt;P&gt;2. if I click for a show - it will allow selecting the lines and will show exactly as&amp;nbsp;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/52747"&gt;@Moshe-A&lt;/a&gt;&amp;nbsp; did, arrows on the lines that show their direction.&lt;/P&gt;&lt;P&gt;3. if I click for change - it allows to select the lines that I want to change their direction and it will flip ( like the reverse command, but I want to use only the lisp and not the command.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you.&lt;/P&gt;&lt;P&gt;Eyal&lt;/P&gt;</description>
      <pubDate>Mon, 26 Oct 2020 10:33:26 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/show-line-direction/m-p/9824149#M68606</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-10-26T10:33:26Z</dc:date>
    </item>
    <item>
      <title>Re: show line direction</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/show-line-direction/m-p/9824279#M68607</link>
      <description>&lt;P&gt;&lt;FONT color="#FF0000"&gt;Dear Eyal,&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#FF0000"&gt;2 times (msg #2 and msg #12) you ignored my question about Writing to AutoCAD Graphics screen.&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;HR /&gt;@Anonymous&amp;nbsp;wrote:&lt;BR /&gt;&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/52747"&gt;@Moshe-A&lt;/a&gt;&amp;nbsp;and&amp;nbsp;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/3930636"&gt;@john.uhden&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you for your brilliant suggestions, the lisp&amp;nbsp;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/52747"&gt;@Moshe-A&lt;/a&gt;&amp;nbsp; sent is almost what I wanted, I will try to explain myself better:&lt;/P&gt;&lt;P&gt;I want - when calling the lisp&lt;/P&gt;&lt;P&gt;1. it will ask - show or change line direction.&lt;/P&gt;&lt;P&gt;&lt;FONT color="#FF0000"&gt;if this is the first invocation of lisp (still no arrows exist) and you select change,&amp;nbsp; what arrow it will change?&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;2. if I click for a show - it will allow selecting the lines and will show exactly as&amp;nbsp;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/52747"&gt;@Moshe-A&lt;/a&gt;&amp;nbsp; did, arrows on the lines that show their direction.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;3. if I click for change - it allows to select the lines that I want to change their direction and it will flip ( like the reverse command, but I want to use only the lisp and not the command.&lt;/P&gt;&lt;P&gt;&lt;FONT color="#FF0000"&gt;just to make it clear for, me here is my senario:&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#FF0000"&gt;say you have 10 segments of lines and you invoke LID for the first time and select all 10, the arrows are positioned in place - OK?! now LID is paused for Show/Change and you choose change and you select only 5 of lines for flip direction - OK?!&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#FF0000"&gt;What do expect for the arrows of the lines &lt;U&gt;&lt;STRONG&gt;you did not selected&lt;/STRONG&gt;&lt;/U&gt; to show?&amp;nbsp;&lt;/FONT&gt;&lt;FONT color="#FF0000"&gt;stay unchanged or.....?&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#FF0000"&gt;Moshe&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 26 Oct 2020 11:54:05 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/show-line-direction/m-p/9824279#M68607</guid>
      <dc:creator>Moshe-A</dc:creator>
      <dc:date>2020-10-26T11:54:05Z</dc:date>
    </item>
    <item>
      <title>Re: show line direction</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/show-line-direction/m-p/9824415#M68608</link>
      <description>&lt;P&gt;&lt;FONT color="#FF0000"&gt;Hi&amp;nbsp;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/52747"&gt;@Moshe-A&lt;/a&gt;&amp;nbsp;,&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#FF0000"&gt;"What do expect for the arrows of the lines&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;U&gt;&lt;STRONG&gt;you did not selected&lt;/STRONG&gt;&lt;/U&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;to show?&amp;nbsp;&lt;/FONT&gt;&lt;FONT color="#FF0000"&gt;stay unchanged or.....?"&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;Once I've changed some of the lines, it will give the same question- "show the arrows of direction or change line direction, if I want to change more or if I want to change it again.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;U&gt;&lt;STRONG&gt;Better explanation:&lt;/STRONG&gt;&lt;/U&gt;&lt;/P&gt;&lt;P&gt;I call the Lid lisp, then it will ask to &lt;STRONG&gt;select lines,&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;I will select the lines that I want to check, and It will &lt;STRONG&gt;&lt;U&gt;show&lt;/U&gt; &lt;/STRONG&gt;the arrows on the lines that show their direction, and ask to&amp;nbsp;&lt;U&gt;&lt;STRONG&gt;change&lt;/STRONG&gt; &lt;/U&gt;or &lt;U&gt;&lt;STRONG&gt;stop&lt;/STRONG&gt; &lt;/U&gt;action.&lt;/P&gt;&lt;P&gt;if I pick &lt;U&gt;&lt;STRONG&gt;change&lt;/STRONG&gt; &lt;/U&gt;I can select the lines that need to flip direction and it will flip them.&lt;/P&gt;&lt;P&gt;if the &lt;STRONG&gt;&lt;U&gt;stop&lt;/U&gt; &lt;/STRONG&gt;is selected so the arrows will be erased and the operation will stop.&lt;/P&gt;&lt;P&gt;the arrows should be shown to be able to see the direction for all the processes.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I think now I clear myself better.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Eyal&lt;/P&gt;</description>
      <pubDate>Mon, 26 Oct 2020 12:50:31 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/show-line-direction/m-p/9824415#M68608</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-10-26T12:50:31Z</dc:date>
    </item>
    <item>
      <title>Re: show line direction</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/show-line-direction/m-p/9824442#M68609</link>
      <description>&lt;P&gt;Eyal&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;email me now&amp;nbsp; &amp;nbsp;&lt;A href="mailto:mos@dhcom.co.il" target="_blank"&gt;mos@dhcom.co.il&lt;/A&gt;&lt;/P&gt;&lt;P&gt;put you phone number&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;moshe&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 26 Oct 2020 12:58:30 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/show-line-direction/m-p/9824442#M68609</guid>
      <dc:creator>Moshe-A</dc:creator>
      <dc:date>2020-10-26T12:58:30Z</dc:date>
    </item>
    <item>
      <title>Re: show line direction</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/show-line-direction/m-p/9825384#M68610</link>
      <description>&lt;P&gt;@Anonymous&amp;nbsp;,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;OK - hope this is final&amp;nbsp;&lt;span class="lia-unicode-emoji" title=":face_screaming_in_fear:"&gt;😱&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;the prompt has two options: Show and Reverse. when reverse, the arrow flip to the other size of the line but the arrow is on the right Azimuth so 'bear' me&amp;nbsp;&lt;span class="lia-unicode-emoji" title=":grinning_face:"&gt;😀&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;enjoy&lt;/P&gt;&lt;P&gt;Moshe&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="general"&gt;(defun c:lid (/ combine_selection line_reverse main_exe ; local functions
                ss0 ss1 action)

 (defun combine_selection (/ i)
  (setq i -1) 
  (repeat (sslength ss1)
   (setq ename (ssname ss1 (setq i (1+ i))))

   (if (not (ssmemb ename ss0))
    (ssadd ename ss0)
   )
  ); repeat
 ); combine_selection
  
  
 (defun line_reverse (ss / elist p0 p1)
  (foreach ename (vl-remove-if 'listp (mapcar 'cadr (ssnamex ss)))
   (setq elist (entget ename))
   (setq p0 (cdr (assoc '10 elist)) p1 (cdr (assoc '11 elist)))
   (setq elist (subst (cons '10 p1) (assoc '10 elist) elist)) 
   (setq elist (subst (cons '11 p0) (assoc '11 elist) elist)) 
   (entmod elist)
  ); foreach
 ); line_reverse


 (defun main_exe (ss / gen_dist wcs-&amp;gt;ucs ; local functions
                       arrow_size ename elist p0 p1 p2 p3 p4 p5 p6 p7 p8)
  (defun gen_dist ()
   (mapcar
    '(lambda (ename / elist)
      (setq elist (entget ename))
      (distance (cdr (assoc '10 elist)) (cdr (assoc '11 elist))) 
     ); lambda
    (vl-remove-if 'listp (mapcar 'cadr (ssnamex ss0)))
   ); mapcar
  ); gen_dist

   
  (defun wcs-&amp;gt;ucs (pt)
   (trans pt 0 1)
  )
   
  (setq arrow_size (* (/ 1.0 4.0) (/ (apply '+ (gen_dist)) (vl-list-length (gen_dist)))))
   
  (foreach ename (vl-remove-if 'listp (mapcar 'cadr (ssnamex ss)))
   (setq elist (entget ename))
   (setq p0 (cdr (assoc '10 elist)))
   (setq p1 (cdr (assoc '11 elist)))
     
   (if (&amp;gt; (* (distance p0 p1) 0.75) (* 2 0.4 arrow_size))
    (progn
     (setq p2 (polar p0 (angle p0 p1) (/ (distance p0 p1) 2)))

     (setq p3 (polar p2 (angle p1 p0) (* 0.40 arrow_size)))
     (setq p4 (polar p2 (angle p0 p1) (* 0.40 arrow_size)))

     (setq p5 (polar p3 (+ (angle p0 p1) (/ pi 2)) (* 0.30 arrow_size)))
     (setq p6 (polar p4 (+ (angle p0 p1) (/ pi 2)) (* 0.30 arrow_size)))

     (setq p7 (polar p6 (- (angle p6 p5) (/ pi 6)) (* 0.25 arrow_size)))
     (setq p8 (polar p6 (+ (angle p6 p5) (/ pi 6)) (* 0.25 arrow_size)))

     (grvecs (list 3 (wcs-&amp;gt;ucs p5) (wcs-&amp;gt;ucs p6)
                   3 (wcs-&amp;gt;ucs p7) (wcs-&amp;gt;ucs p6)
                   3 (wcs-&amp;gt;ucs p6) (wcs-&amp;gt;ucs p8)))
    ); progn
   ); if
  ); foreach
 ); main_exe

  
 ; here start c:LID
 (setq ss0 (ssadd))
   
 (while (and
           (not (initget "Show Reverse"))
           (setq action (getkword "\nShow/Reverse: "))
           (setq ss1 (ssget '((0 . "line"))))
        )
  (redraw)
  
  (cond
   ((eq action "Show")
    (combine_selection)
    (main_exe ss0)
   ); case
   ((eq action "Reverse")
    (line_reverse ss1) 
    (combine_selection)
    (main_exe ss0)
   ); case
  ); cond
 ); while
  
 (princ)
); c:LID&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 26 Oct 2020 18:38:40 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/show-line-direction/m-p/9825384#M68610</guid>
      <dc:creator>Moshe-A</dc:creator>
      <dc:date>2020-10-26T18:38:40Z</dc:date>
    </item>
  </channel>
</rss>

