<?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: modify lisp to allow select multiple polylines in Visual LISP, AutoLISP and General Customization Forum</title>
    <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/modify-lisp-to-allow-select-multiple-polylines/m-p/7904318#M106660</link>
    <description>Then I need a new code to write.&lt;BR /&gt;&lt;BR /&gt;Sadly I'm new in autolisp.&lt;BR /&gt;&lt;BR /&gt;Anyone might help me?</description>
    <pubDate>Tue, 03 Apr 2018 14:03:36 GMT</pubDate>
    <dc:creator>jtm2020hyo</dc:creator>
    <dc:date>2018-04-03T14:03:36Z</dc:date>
    <item>
      <title>modify lisp to allow select multiple polylines</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/modify-lisp-to-allow-select-multiple-polylines/m-p/7898786#M106644</link>
      <description>&lt;P&gt;i want change this autolisp to allow me select multiple polyline&amp;nbsp;&lt;/P&gt;&lt;P&gt;this lisp convert straight segments to arc segments . but one polyline for time .&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;(defun c:lwsegs2arced ( / massoclst nthmassocsubst v^v unit _ilp doc lw enx gr enxb p1 p2 p3 b i n )

  (vl-load-com)

  (defun massoclst ( key lst )
    (if (assoc key lst) (cons (assoc key lst) (massoclst key (cdr (member (assoc key lst) lst)))))
  )

  (defun nthmassocsubst ( n key value lst / k slst p j plst m tst pslst )
    (setq k (length (setq slst (member (assoc key lst) lst))))
    (setq p (- (length lst) k))
    (setq j -1)
    (repeat p
      (setq plst (cons (nth (setq j (1+ j)) lst) plst))
    )
    (setq plst (reverse plst))
    (setq j -1)
    (setq m -1)
    (repeat k
      (setq j (1+ j))
      (if (equal (assoc key (member (nth j slst) slst)) (nth j slst) 1e-6)
        (setq m (1+ m))
      )
      (if (and (not tst) (= n m))
        (setq pslst (cons (cons key value) pslst) tst t)
        (setq pslst (cons (nth j slst) pslst))
      )
    )
    (setq pslst (reverse pslst))
    (append plst pslst)
  )

  (defun v^v ( u v )
    (mapcar '(lambda ( s1 s2 a b ) (+ ((eval s1) (* (nth a u) (nth b v))) ((eval s2) (* (nth a v) (nth b u))))) '(+ - +) '(- + -) '(1 0 0) '(2 2 1))
  )

  (defun unit ( v )
    (mapcar '(lambda ( x ) (/ x (distance '(0.0 0.0 0.0) v))) v)
  )

  (defun _ilp ( p1 p2 o nor / p1p p2p op tp pp p )
    (if (not (equal (v^v nor (unit (mapcar '- p2 p1))) '(0.0 0.0 0.0) 1e-7))
      (progn
        (setq p1p (trans p1 0 (v^v nor (unit (mapcar '- p2 p1))))
              p2p (trans p2 0 (v^v nor (unit (mapcar '- p2 p1))))
              op  (trans o 0 (v^v nor (unit (mapcar '- p2 p1))))
              op  (list (car op) (cadr op) (caddr p1p))
              tp  (polar op (+ (* 0.5 pi) (angle '(0.0 0.0 0.0) (trans nor 0 (v^v nor (unit (mapcar '- p2 p1)))))) 1.0)
        )
        (if (inters p1p p2p op tp nil)
          (progn
            (setq p (trans (inters p1p p2p op tp nil) (v^v nor (unit (mapcar '- p2 p1))) 0))
            p
          )
          nil
        )
      )
      (progn
        (setq pp (list (car (trans p1 0 nor)) (cadr (trans p1 0 nor)) (caddr (trans o 0 nor))))
        (setq p (trans pp nor 0))
        p
      )
    )
  )

  (or doc (setq doc (vla-get-ActiveDocument (vlax-get-acad-object))))
  (vla-startundomark doc)
  (if (and (setq lw (entsel "\nPick LWPOLYLINE..."))
          (= (cdr (assoc 0 (setq enx (entget (car lw))))) "LWPOLYLINE")
      )
    (progn
      (setq i (fix (vlax-curve-getParamAtPoint
                  (car lw)
                  (vlax-curve-getClosestPointToProjection (car lw) (trans (cadr lw) 1 0) '(0.0 0.0 1.0))
                  ) ;_  vlax-curve-getParamAtPoint
              ) ;_  fix
           p1 (vlax-curve-getPointAtParam (car lw) i)
           p3 (vlax-curve-getPointAtParam (car lw) (1+ i))
           lw (car lw)
      )
      (setq enxb (massoclst 42 enx))
      (while (= 5 (car (setq gr (grread t))))
        (setq p2 (_ilp (trans (cadr gr) 1 0) (mapcar '+ (trans (cadr gr) 1 0) '(0.0 0.0 1.0)) p1 (cdr (assoc 210 (entget lw)))))
        (setq b ((lambda (a) (/ (sin a) (cos a)))
                (/ (- (angle (trans p2 0 lw) (trans p3 0 lw)) (angle (trans p1 0 lw) (trans p2 0 lw))) 2.0)
               )
        )
        (setq n -1)
        (foreach dxf42 enxb
          (setq n (1+ n))
          (if (= n i)
            (setq enx (nthmassocsubst n 42 b enx))
            (setq enx (nthmassocsubst n 42 (+ (cdr dxf42) b) enx))
          )
        )
        (entupd (cdr (assoc -1 (entmod enx))))
      )
    )
    (prompt "\n Nothing selected or picked object not a LWPOLYLINE ")
  )
  (vla-endundomark doc)
  (princ)
)&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 31 Mar 2018 17:54:32 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/modify-lisp-to-allow-select-multiple-polylines/m-p/7898786#M106644</guid>
      <dc:creator>jtm2020hyo</dc:creator>
      <dc:date>2018-03-31T17:54:32Z</dc:date>
    </item>
    <item>
      <title>Re: modify lisp to allow select multiple polylines</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/modify-lisp-to-allow-select-multiple-polylines/m-p/7899072#M106645</link>
      <description>&lt;P&gt;Try this [minimally tested]:&lt;/P&gt;
&lt;PRE&gt;(defun c:lwsegs2arced ( / massoclst nthmassocsubst v^v unit _ilp doc lw enx gr enxb p1 p2 p3 b i n )

  (vl-load-com)

  (defun massoclst ( key lst )
    (if (assoc key lst) (cons (assoc key lst) (massoclst key (cdr (member (assoc key lst) lst)))))
  )

  (defun nthmassocsubst ( n key value lst / k slst p j plst m tst pslst )
    (setq k (length (setq slst (member (assoc key lst) lst))))
    (setq p (- (length lst) k))
    (setq j -1)
    (repeat p
      (setq plst (cons (nth (setq j (1+ j)) lst) plst))
    )
    (setq plst (reverse plst))
    (setq j -1)
    (setq m -1)
    (repeat k
      (setq j (1+ j))
      (if (equal (assoc key (member (nth j slst) slst)) (nth j slst) 1e-6)
        (setq m (1+ m))
      )
      (if (and (not tst) (= n m))
        (setq pslst (cons (cons key value) pslst) tst t)
        (setq pslst (cons (nth j slst) pslst))
      )
    )
    (setq pslst (reverse pslst))
    (append plst pslst)
  )

  (defun v^v ( u v )
    (mapcar '(lambda ( s1 s2 a b ) (+ ((eval s1) (* (nth a u) (nth b v))) ((eval s2) (* (nth a v) (nth b u))))) '(+ - +) '(- + -) '(1 0 0) '(2 2 1))
  )

  (defun unit ( v )
    (mapcar '(lambda ( x ) (/ x (distance '(0.0 0.0 0.0) v))) v)
  )

  (defun _ilp ( p1 p2 o nor / p1p p2p op tp pp p )
    (if (not (equal (v^v nor (unit (mapcar '- p2 p1))) '(0.0 0.0 0.0) 1e-7))
      (progn
        (setq p1p (trans p1 0 (v^v nor (unit (mapcar '- p2 p1))))
              p2p (trans p2 0 (v^v nor (unit (mapcar '- p2 p1))))
              op  (trans o 0 (v^v nor (unit (mapcar '- p2 p1))))
              op  (list (car op) (cadr op) (caddr p1p))
              tp  (polar op (+ (* 0.5 pi) (angle '(0.0 0.0 0.0) (trans nor 0 (v^v nor (unit (mapcar '- p2 p1)))))) 1.0)
        )
        (if (inters p1p p2p op tp nil)
          (progn
            (setq p (trans (inters p1p p2p op tp nil) (v^v nor (unit (mapcar '- p2 p1))) 0))
            p
          )
          nil
        )
      )
      (progn
        (setq pp (list (car (trans p1 0 nor)) (cadr (trans p1 0 nor)) (caddr (trans o 0 nor))))
        (setq p (trans pp nor 0))
        p
      )
    )
  )

  (or doc (setq doc (vla-get-ActiveDocument (vlax-get-acad-object))))
  (vla-startundomark doc)
&lt;FONT color="#999999"&gt;;;;;;  (if
&lt;/FONT&gt;  &lt;FONT color="#ff0000"&gt;(while&lt;/FONT&gt; &lt;EM&gt;&lt;FONT color="#00ccff"&gt;;;; &amp;lt; CHANGED from if to while
&lt;/FONT&gt;&lt;/EM&gt;    (and
      (setq lw (entsel "\nPick LWPOLYLINE or &amp;lt;exit&amp;gt;: "))
      (= (cdr (assoc 0 (setq enx (entget (car lw))))) "LWPOLYLINE")
    )
&lt;FONT color="#999999"&gt;;;;;;    (progn&lt;/FONT&gt;
      (setq i (fix (vlax-curve-getParamAtPoint
                  (car lw)
                  (vlax-curve-getClosestPointToProjection (car lw) (trans (cadr lw) 1 0) '(0.0 0.0 1.0))
                  ) ;_  vlax-curve-getParamAtPoint
              ) ;_  fix
           p1 (vlax-curve-getPointAtParam (car lw) i)
           p3 (vlax-curve-getPointAtParam (car lw) (1+ i))
           lw (car lw)
      )
      (setq enxb (massoclst 42 enx))
      (while (= 5 (car (setq gr (grread t))))
        (setq p2 (_ilp (trans (cadr gr) 1 0) (mapcar '+ (trans (cadr gr) 1 0) '(0.0 0.0 1.0)) p1 (cdr (assoc 210 (entget lw)))))
        (setq b ((lambda (a) (/ (sin a) (cos a)))
                (/ (- (angle (trans p2 0 lw) (trans p3 0 lw)) (angle (trans p1 0 lw) (trans p2 0 lw))) 2.0)
               )
        )
        (setq n -1)
        (foreach dxf42 enxb
          (setq n (1+ n))
          (if (= n i)
            (setq enx (nthmassocsubst n 42 b enx))
            (setq enx (nthmassocsubst n 42 (+ (cdr dxf42) b) enx))
          )
        )
        (entupd (cdr (assoc -1 (entmod enx))))
      )
&lt;FONT color="#999999"&gt;;;;;;    )
;;;;;    (prompt "\n Nothing selected or picked object not a LWPOLYLINE ")
;;;;;  ); if
&lt;/FONT&gt;  &lt;FONT color="#ff0000"&gt;); while&lt;/FONT&gt; &lt;EM&gt;&lt;FONT color="#00ccff"&gt;;;; &amp;lt; CHANGED from if to while
&lt;/FONT&gt;&lt;/EM&gt;  (vla-endundomark doc)
  (princ)
)&lt;/PRE&gt;
&lt;P&gt;You can keep picking them, one at a time [because of the need to pick for the curviness of each] but as many as you want within one running of the command.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;It ends with Enter &lt;EM&gt;or&lt;/EM&gt;&amp;nbsp; if you either pick the wrong kind of thing or miss in picking.&amp;nbsp; With some additional code, it could be made to ask again in those situations.&lt;/P&gt;</description>
      <pubDate>Sat, 31 Mar 2018 22:21:33 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/modify-lisp-to-allow-select-multiple-polylines/m-p/7899072#M106645</guid>
      <dc:creator>Kent1Cooper</dc:creator>
      <dc:date>2018-03-31T22:21:33Z</dc:date>
    </item>
    <item>
      <title>Re: modify lisp to allow select multiple polylines</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/modify-lisp-to-allow-select-multiple-polylines/m-p/7899108#M106646</link>
      <description>&lt;P&gt;It's not that easy.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Yes, it's easy to create a selection set of polylines, but your code relies on the pick point which ssget does not return unless you pick the poylines individually or by fence, unless you want to add bulges to all segments of all the selected polylines.&amp;nbsp; If that is the case then how do you want to determine the size and direction of the bulge, a fixed radius on the outside maybe?&amp;nbsp; A specific altitude?&amp;nbsp; A value related to the date or day of the year?&amp;nbsp; The age of Lincoln were he still alive?&amp;nbsp; The current number of Yankees home runs?&amp;nbsp; The cube root of the sum of the day's winning lottery numbers?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Then again, maybe you just wish to create bulged segments so that you can grip/stretch the midpoint.&amp;nbsp; If that may be the case then you might enjoy my BULGE.lsp (attached).&amp;nbsp; Existing segments can be straight.&amp;nbsp; The code is very ancient, but it still works.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 31 Mar 2018 23:23:55 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/modify-lisp-to-allow-select-multiple-polylines/m-p/7899108#M106646</guid>
      <dc:creator>john.uhden</dc:creator>
      <dc:date>2018-03-31T23:23:55Z</dc:date>
    </item>
    <item>
      <title>Re: modify lisp to allow select multiple polylines</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/modify-lisp-to-allow-select-multiple-polylines/m-p/7901153#M106647</link>
      <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;i want create bulges like the imagen but i need do this 1000 polylines for each time code is used , bulges size is a radio since base point . enter digits for determinate a radio might be useful .&lt;/P&gt;&lt;P&gt;&amp;nbsp;&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="image.png" style="width: 705px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/483211iDADDDEA4EC438948/image-size/large?v=v2&amp;amp;px=999" role="button" title="image.png" alt="image.png" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 02 Apr 2018 14:43:10 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/modify-lisp-to-allow-select-multiple-polylines/m-p/7901153#M106647</guid>
      <dc:creator>jtm2020hyo</dc:creator>
      <dc:date>2018-04-02T14:43:10Z</dc:date>
    </item>
    <item>
      <title>Re: modify lisp to allow select multiple polylines</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/modify-lisp-to-allow-select-multiple-polylines/m-p/7901165#M106648</link>
      <description>&lt;P&gt;I need to select 1000 lines at a time , i need&amp;nbsp; all able selection options ,if possible .&lt;/P&gt;</description>
      <pubDate>Mon, 02 Apr 2018 14:48:37 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/modify-lisp-to-allow-select-multiple-polylines/m-p/7901165#M106648</guid>
      <dc:creator>jtm2020hyo</dc:creator>
      <dc:date>2018-04-02T14:48:37Z</dc:date>
    </item>
    <item>
      <title>Re: modify lisp to allow select multiple polylines</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/modify-lisp-to-allow-select-multiple-polylines/m-p/7901316#M106649</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/3529276"&gt;@jtm2020hyo&lt;/a&gt; wrote:&lt;BR /&gt;
&lt;P&gt;i want create bulges like the imagen but i need do this 1000 polylines for each time code is used , bulges size is a radio since base point . enter digits for determinate a radio might be useful .&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Here's the huge difficulty with that.&amp;nbsp; How is a routine going to decide in which direction to bulge the segments?&amp;nbsp; If it should always go in the same direction relative to the direction the Polylines are drawn, you're just as likely to get results like this:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="LWSegsArc.PNG" style="width: 302px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/483238i6CAB98D72E80C018/image-size/large?v=v2&amp;amp;px=999" role="button" title="LWSegsArc.PNG" alt="LWSegsArc.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;in which some bulge to one side and some to the other.&amp;nbsp; Is there anything about your 1000 Polylines from which a routine could decide which way to go?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Also, if you ask for a radi&lt;STRONG&gt;us&lt;/STRONG&gt; for the arc segments, what should happen if a Polyline line segment is&amp;nbsp;&lt;EM&gt;too long&lt;/EM&gt;&amp;nbsp; for that radius to be possible?&amp;nbsp; For example, a 2-unit-long line segment cannot be converted into an arc segments with a radius less than&amp;nbsp;1 unit, since there can be no arc of that radius that can reach between that segment's endpoints.&lt;/P&gt;</description>
      <pubDate>Mon, 02 Apr 2018 15:47:09 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/modify-lisp-to-allow-select-multiple-polylines/m-p/7901316#M106649</guid>
      <dc:creator>Kent1Cooper</dc:creator>
      <dc:date>2018-04-02T15:47:09Z</dc:date>
    </item>
    <item>
      <title>Re: modify lisp to allow select multiple polylines</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/modify-lisp-to-allow-select-multiple-polylines/m-p/7901606#M106650</link>
      <description>&lt;P&gt;i need that all selected polylines to work like an unique polyline and convert all their segments to arcs . direction and radio defined for (image) : (1) base point and (2) end point . and if possible add (d)igits for radio or a "(r)ight or (l)eft direction" options its better .&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="image.png" style="width: 705px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/483297i311C354C7B04048E/image-size/large?v=v2&amp;amp;px=999" role="button" title="image.png" alt="image.png" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 02 Apr 2018 17:27:05 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/modify-lisp-to-allow-select-multiple-polylines/m-p/7901606#M106650</guid>
      <dc:creator>jtm2020hyo</dc:creator>
      <dc:date>2018-04-02T17:27:05Z</dc:date>
    </item>
    <item>
      <title>Re: modify lisp to allow select multiple polylines</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/modify-lisp-to-allow-select-multiple-polylines/m-p/7901991#M106651</link>
      <description>&lt;P&gt;Those arc segments are clearly not all of the same radius.&amp;nbsp; They probably all have the same &lt;EM&gt;bulge factor&lt;/EM&gt;&amp;nbsp; as Polyline arc segments are defined -- that's what the original routine does.&amp;nbsp; That means that they all sweep through the same included angle.&amp;nbsp; Is that acceptable, instead of all having the same radius?&lt;/P&gt;</description>
      <pubDate>Mon, 02 Apr 2018 19:52:14 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/modify-lisp-to-allow-select-multiple-polylines/m-p/7901991#M106651</guid>
      <dc:creator>Kent1Cooper</dc:creator>
      <dc:date>2018-04-02T19:52:14Z</dc:date>
    </item>
    <item>
      <title>Re: modify lisp to allow select multiple polylines</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/modify-lisp-to-allow-select-multiple-polylines/m-p/7902392#M106652</link>
      <description>&lt;P&gt;I think it might be good enough if he just pointed to the convex direction with two (2) getpoints.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Of course it still can't be assumed that all the polylines were drawn in the same general direction, so that would have to be determined within the code for each one.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;As to the size of the bulge, I recommend using a constant altitude since the alternate method for computing the bulge is 2 * altitude divided by chord&lt;/P&gt;</description>
      <pubDate>Mon, 02 Apr 2018 22:46:59 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/modify-lisp-to-allow-select-multiple-polylines/m-p/7902392#M106652</guid>
      <dc:creator>john.uhden</dc:creator>
      <dc:date>2018-04-02T22:46:59Z</dc:date>
    </item>
    <item>
      <title>Re: modify lisp to allow select multiple polylines</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/modify-lisp-to-allow-select-multiple-polylines/m-p/7902579#M106653</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/3930636"&gt;@john.uhden&lt;/a&gt; wrote:&lt;BR /&gt;
&lt;P&gt;....&amp;nbsp;&lt;/P&gt;
&lt;P&gt;As to the size of the bulge, I recommend using a constant altitude since the alternate method for computing the bulge is 2 * altitude divided by chord&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;I'm thinking constant bulge factor, because you can then simply&amp;nbsp;stick in the (42 . 1.2345) or whatever it is [taken from the first one that the User would apply the original code to], in place of all (42 . 0.0) line-segment bulge factors in all Polylines' entity data lists -- no calculations to do, and it's the same for all of them, and there would be no possibility of an invalid value as there could be for a constant radius.&amp;nbsp; They claim the Polylines are all drawn in the same direction [in the image in Post 7], which if true would make it comparatively simple.&lt;/P&gt;</description>
      <pubDate>Tue, 03 Apr 2018 00:42:23 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/modify-lisp-to-allow-select-multiple-polylines/m-p/7902579#M106653</guid>
      <dc:creator>Kent1Cooper</dc:creator>
      <dc:date>2018-04-03T00:42:23Z</dc:date>
    </item>
    <item>
      <title>Re: modify lisp to allow select multiple polylines</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/modify-lisp-to-allow-select-multiple-polylines/m-p/7902951#M106654</link>
      <description>&lt;P&gt;yes, that is acceptable. i just want select 1000 polylines and use code to conver straight polylines segments to arcs . and if possible , vice versa .&lt;/P&gt;</description>
      <pubDate>Tue, 03 Apr 2018 05:41:05 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/modify-lisp-to-allow-select-multiple-polylines/m-p/7902951#M106654</guid>
      <dc:creator>jtm2020hyo</dc:creator>
      <dc:date>2018-04-03T05:41:05Z</dc:date>
    </item>
    <item>
      <title>Re: modify lisp to allow select multiple polylines</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/modify-lisp-to-allow-select-multiple-polylines/m-p/7902954#M106655</link>
      <description>&lt;P&gt;direction is not relevant . i just want convert polylines segments to arcs no matter directions like original code. and if possible add all select options , like select similars , all , etc .&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 03 Apr 2018 05:43:23 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/modify-lisp-to-allow-select-multiple-polylines/m-p/7902954#M106655</guid>
      <dc:creator>jtm2020hyo</dc:creator>
      <dc:date>2018-04-03T05:43:23Z</dc:date>
    </item>
    <item>
      <title>Re: modify lisp to allow select multiple polylines</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/modify-lisp-to-allow-select-multiple-polylines/m-p/7902959#M106656</link>
      <description>&lt;P&gt;direction no matter . if is left or right no matter . i just want select a lot of polylines .&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;but if everyone want just a direction for each use , i might suggest use "polyline reverse" option . but i'm not expert in autolisp .&lt;/P&gt;</description>
      <pubDate>Tue, 03 Apr 2018 05:39:49 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/modify-lisp-to-allow-select-multiple-polylines/m-p/7902959#M106656</guid>
      <dc:creator>jtm2020hyo</dc:creator>
      <dc:date>2018-04-03T05:39:49Z</dc:date>
    </item>
    <item>
      <title>Re: modify lisp to allow select multiple polylines</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/modify-lisp-to-allow-select-multiple-polylines/m-p/7902974#M106657</link>
      <description>&lt;P&gt;thanks for code , work like you explained us . do you might do a (F)ence selection option ? or a (P)revius selection option ? or anything from this page :&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A href="https://www.ellenfinkelstein.com/acadblog/use-all-of-your-selection-options/" target="_blank"&gt;https://www.ellenfinkelstein.com/acadblog/use-all-of-your-selection-options/&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 03 Apr 2018 05:49:39 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/modify-lisp-to-allow-select-multiple-polylines/m-p/7902974#M106657</guid>
      <dc:creator>jtm2020hyo</dc:creator>
      <dc:date>2018-04-03T05:49:39Z</dc:date>
    </item>
    <item>
      <title>Re: modify lisp to allow select multiple polylines</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/modify-lisp-to-allow-select-multiple-polylines/m-p/7903806#M106658</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; wrote:&lt;/BLOCKQUOTE&gt;
&lt;HR /&gt;&lt;HR /&gt;
&lt;P&gt;....&amp;nbsp; They claim the Polylines are all drawn in the same direction [in the image in Post 7]....&lt;/P&gt;
&lt;HR /&gt;
&lt;P&gt;Now I'm not so sure.&amp;nbsp; Does "all polyline have same direction" mean that they&amp;nbsp;will all be &lt;EM&gt;drawn&lt;/EM&gt;&amp;nbsp; running in the same direction [as I assumed above], or that you want them all to &lt;EM&gt;bulge&lt;/EM&gt;&amp;nbsp; in the same direction?&amp;nbsp; You also say in later Posts that direction is not relevant or does not matter.&amp;nbsp; Does that mean the direction of bulge can be either way, and possibly different from one Polyline to another?&amp;nbsp; A more extreme example of my image in Post 6:&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="LWSEGA.PNG" style="width: 273px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/483670i5324D2015030ECDF/image-size/large?v=v2&amp;amp;px=999" role="button" title="LWSEGA.PNG" alt="LWSEGA.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Is that acceptable?&amp;nbsp; If they are not all drawn going in the same direction, and if you apply&amp;nbsp;the same kind of bulge factor on all of them, that is the kind of result you can expect.&lt;/P&gt;</description>
      <pubDate>Tue, 03 Apr 2018 11:43:52 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/modify-lisp-to-allow-select-multiple-polylines/m-p/7903806#M106658</guid>
      <dc:creator>Kent1Cooper</dc:creator>
      <dc:date>2018-04-03T11:43:52Z</dc:date>
    </item>
    <item>
      <title>Re: modify lisp to allow select multiple polylines</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/modify-lisp-to-allow-select-multiple-polylines/m-p/7903816#M106659</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/3529276"&gt;@jtm2020hyo&lt;/a&gt; wrote:&lt;BR /&gt;
&lt;P&gt;thanks for code , work like you explained us . do you might do a (F)ence selection option ? or a (P)revius selection option ? ....&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Not with that code.&amp;nbsp; It depends on / requires a &lt;EM&gt;selection of an individual Polyline&lt;/EM&gt;, and it uses &lt;EM&gt;the point at which it was selected&lt;/EM&gt;, and the movement of the cursor by the User after selection, to&amp;nbsp;determine the shape of the arc segments.&amp;nbsp; A routine to do many at a time is going to need to go about it in a very different way.&lt;/P&gt;</description>
      <pubDate>Tue, 03 Apr 2018 11:49:38 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/modify-lisp-to-allow-select-multiple-polylines/m-p/7903816#M106659</guid>
      <dc:creator>Kent1Cooper</dc:creator>
      <dc:date>2018-04-03T11:49:38Z</dc:date>
    </item>
    <item>
      <title>Re: modify lisp to allow select multiple polylines</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/modify-lisp-to-allow-select-multiple-polylines/m-p/7904318#M106660</link>
      <description>Then I need a new code to write.&lt;BR /&gt;&lt;BR /&gt;Sadly I'm new in autolisp.&lt;BR /&gt;&lt;BR /&gt;Anyone might help me?</description>
      <pubDate>Tue, 03 Apr 2018 14:03:36 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/modify-lisp-to-allow-select-multiple-polylines/m-p/7904318#M106660</guid>
      <dc:creator>jtm2020hyo</dc:creator>
      <dc:date>2018-04-03T14:03:36Z</dc:date>
    </item>
    <item>
      <title>Re: modify lisp to allow select multiple polylines</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/modify-lisp-to-allow-select-multiple-polylines/m-p/7904390#M106661</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/3529276"&gt;@jtm2020hyo&lt;/a&gt; wrote:&lt;BR /&gt;Then I need a new code to write.&lt;BR /&gt;....&lt;BR /&gt;&lt;HR /&gt;...&lt;/BLOCKQUOTE&gt;
&lt;P&gt;As a simple and basic&amp;nbsp;starting point, this will impose a bulge factor of of 0.25 on all line segments in all selected LWPolylines:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;(defun C:PLAA (/ ss n pldata) ; = Polyline Line segments All Arcs
  (if (setq ss (ssget ":L" '((0 . "LWPOLYLINE"))))
    (repeat (setq n (sslength ss))
      (setq pldata (entget (ssname ss (setq n (1- n)))))
      (entmod (subst '(42 . 0.25) '(42 . 0.0) pldata))
    )
  )
)&lt;/PRE&gt;
&lt;P&gt;with this kind of result:&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="PLAA.PNG" style="width: 375px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/483769iDD14657F629723C3/image-size/large?v=v2&amp;amp;px=999" role="button" title="PLAA.PNG" alt="PLAA.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The four left-most Polylines were drawn from top down, and the far right one was drawn from bottom up, which is why it bulges to the other side.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You can select the Polylines by all the usual selection options.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The 0.25 bulge factor results in an included angle of approximately 56 degrees for each arc segment.&amp;nbsp; Increase the 0.25 for greater bulge -- 1.0 will give you full half-circle arc segments.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;It will &lt;EM&gt;not&lt;/EM&gt;&amp;nbsp; change any &lt;EM&gt;existing&lt;/EM&gt;&amp;nbsp; arc segments to have that same bulge factor, but will only change &lt;EM&gt;line&lt;/EM&gt;&amp;nbsp; segments in the originals, because it replace only bulge factors of 0 [which means line segments] with bulge factors of 0.25.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Things that would require adding more to the code:&lt;/P&gt;
&lt;P&gt;::&amp;nbsp; if you want to have them all bulge in the same general direction, regardless of in what direction they were drawn [a better idea of the kinds of configurations you&amp;nbsp;might have would be needed -- would&amp;nbsp;it always be possible to determine a "same general direction"?];&lt;/P&gt;
&lt;P&gt;::&amp;nbsp; if you want to have the User do the original-code thing on one Polyline, and then apply that same bulge factor to a selection set of others;&lt;/P&gt;
&lt;P&gt;::&amp;nbsp; if you want the User to specify the bulge factor, or the swept angle of each arc segment, or a radius [which could result in impossible situations as described earlier], or some other criterion.&lt;/P&gt;</description>
      <pubDate>Tue, 03 Apr 2018 14:26:08 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/modify-lisp-to-allow-select-multiple-polylines/m-p/7904390#M106661</guid>
      <dc:creator>Kent1Cooper</dc:creator>
      <dc:date>2018-04-03T14:26:08Z</dc:date>
    </item>
    <item>
      <title>Re: modify lisp to allow select multiple polylines</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/modify-lisp-to-allow-select-multiple-polylines/m-p/7904570#M106662</link>
      <description>The constant bulge IS probably a better idea. I would provide a getreal&lt;BR /&gt;with a default value so that if a positive bulge were the wrong direction&lt;BR /&gt;they could run the routine again with a negative value.&lt;BR /&gt;&lt;BR /&gt;I also think I would provide the standard Uhden method of selection&lt;BR /&gt;options...&lt;BR /&gt;/Layer(s)/Picklayer/Manually:</description>
      <pubDate>Tue, 03 Apr 2018 15:04:55 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/modify-lisp-to-allow-select-multiple-polylines/m-p/7904570#M106662</guid>
      <dc:creator>john.uhden</dc:creator>
      <dc:date>2018-04-03T15:04:55Z</dc:date>
    </item>
    <item>
      <title>Re: modify lisp to allow select multiple polylines</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/modify-lisp-to-allow-select-multiple-polylines/m-p/7904878#M106663</link>
      <description>&lt;P&gt;this code in pretty good for my needs . but i'm not sure if should mark this as solved because the first request was to modify the original code to a more complete one .&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;if no one asnwer in a time i will mark this as the solution .&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 03 Apr 2018 16:23:43 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/modify-lisp-to-allow-select-multiple-polylines/m-p/7904878#M106663</guid>
      <dc:creator>jtm2020hyo</dc:creator>
      <dc:date>2018-04-03T16:23:43Z</dc:date>
    </item>
  </channel>
</rss>

