<?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: Converting 2D Polyline to 3D Polyline without losing Object Data in Visual LISP, AutoLISP and General Customization Forum</title>
    <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/converting-2d-polyline-to-3d-polyline-without-losing-object-data/m-p/10609315#M55644</link>
    <description>&lt;P&gt;@Anonymous&amp;nbsp;,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can you post an example drawing with this Object Data?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Are you using C3D? Map 3D? Vanilla AutoCAD?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;That would help if you could answer those.&lt;/P&gt;&lt;P&gt;Best,&lt;/P&gt;&lt;P&gt;~DD&lt;/P&gt;</description>
    <pubDate>Wed, 08 Sep 2021 21:34:25 GMT</pubDate>
    <dc:creator>CodeDing</dc:creator>
    <dc:date>2021-09-08T21:34:25Z</dc:date>
    <item>
      <title>Converting 2D Polyline to 3D Polyline without losing Object Data</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/converting-2d-polyline-to-3d-polyline-without-losing-object-data/m-p/10609278#M55643</link>
      <description>&lt;P&gt;Hey,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm trying to convert some 2D Polylines with object data to 3d polylines without losing that data. There used to be a lisp routine called C3D that would do this but i can't seem to find it in AutoCAD 2022 and it doesn't work when i copy this routine from another source and import it. Does anyone know how to do this or have a varied lisp routine to do it.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thankyou&lt;/P&gt;</description>
      <pubDate>Wed, 08 Sep 2021 21:18:22 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/converting-2d-polyline-to-3d-polyline-without-losing-object-data/m-p/10609278#M55643</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2021-09-08T21:18:22Z</dc:date>
    </item>
    <item>
      <title>Re: Converting 2D Polyline to 3D Polyline without losing Object Data</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/converting-2d-polyline-to-3d-polyline-without-losing-object-data/m-p/10609315#M55644</link>
      <description>&lt;P&gt;@Anonymous&amp;nbsp;,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can you post an example drawing with this Object Data?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Are you using C3D? Map 3D? Vanilla AutoCAD?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;That would help if you could answer those.&lt;/P&gt;&lt;P&gt;Best,&lt;/P&gt;&lt;P&gt;~DD&lt;/P&gt;</description>
      <pubDate>Wed, 08 Sep 2021 21:34:25 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/converting-2d-polyline-to-3d-polyline-without-losing-object-data/m-p/10609315#M55644</guid>
      <dc:creator>CodeDing</dc:creator>
      <dc:date>2021-09-08T21:34:25Z</dc:date>
    </item>
    <item>
      <title>Re: Converting 2D Polyline to 3D Polyline without losing Object Data</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/converting-2d-polyline-to-3d-polyline-without-losing-object-data/m-p/10609323#M55645</link>
      <description>Can you also define exactly what you mean by "..without losing Object Data..."? Once you change object types like that a lot of things will change too.</description>
      <pubDate>Wed, 08 Sep 2021 21:40:55 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/converting-2d-polyline-to-3d-polyline-without-losing-object-data/m-p/10609323#M55645</guid>
      <dc:creator>pendean</dc:creator>
      <dc:date>2021-09-08T21:40:55Z</dc:date>
    </item>
    <item>
      <title>Re: Converting 2D Polyline to 3D Polyline without losing Object Data</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/converting-2d-polyline-to-3d-polyline-without-losing-object-data/m-p/10609772#M55646</link>
      <description>&lt;P&gt;&lt;SPAN&gt;&lt;FONT color="#FF0000"&gt;it doesn't work&lt;/FONT&gt;, post the lisp.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 09 Sep 2021 04:33:38 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/converting-2d-polyline-to-3d-polyline-without-losing-object-data/m-p/10609772#M55646</guid>
      <dc:creator>Sea-Haven</dc:creator>
      <dc:date>2021-09-09T04:33:38Z</dc:date>
    </item>
    <item>
      <title>Re: Converting 2D Polyline to 3D Polyline without losing Object Data</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/converting-2d-polyline-to-3d-polyline-without-losing-object-data/m-p/10610226#M55647</link>
      <description>&lt;P&gt;Example drawing attached with a couple of 2d Polylines. I am running C3D but the object data is added using Map.&lt;/P&gt;&lt;P&gt;The Object Data on the polylines is lost when using grading/polyline utilities/convert 2d to 3d. The C3D lisp routine, also attached, used to do the conversion and maintain the object data.&lt;/P&gt;</description>
      <pubDate>Thu, 09 Sep 2021 08:46:31 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/converting-2d-polyline-to-3d-polyline-without-losing-object-data/m-p/10610226#M55647</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2021-09-09T08:46:31Z</dc:date>
    </item>
    <item>
      <title>Re: Converting 2D Polyline to 3D Polyline without losing Object Data</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/converting-2d-polyline-to-3d-polyline-without-losing-object-data/m-p/10610353#M55648</link>
      <description>&lt;P&gt;Hi,&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Your C3D.lsp works fine in my Civil 3D 2022 and OD are keept. To load the lisp, just drag&amp;amp;drop from windows explorer into AutoCAD.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Here is file after conversion.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Olivier&lt;/P&gt;</description>
      <pubDate>Thu, 09 Sep 2021 09:40:04 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/converting-2d-polyline-to-3d-polyline-without-losing-object-data/m-p/10610353#M55648</guid>
      <dc:creator>O_Eckmann</dc:creator>
      <dc:date>2021-09-09T09:40:04Z</dc:date>
    </item>
    <item>
      <title>Re: Converting 2D Polyline to 3D Polyline without losing Object Data</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/converting-2d-polyline-to-3d-polyline-without-losing-object-data/m-p/10612217#M55649</link>
      <description>&lt;P&gt;awesome thanks, it was to do with the volume of lines and the drawing I was using. Copy and paste to original co-ordinates with only a couple of thousand lines at a time worked a treat&lt;/P&gt;</description>
      <pubDate>Thu, 09 Sep 2021 23:27:41 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/converting-2d-polyline-to-3d-polyline-without-losing-object-data/m-p/10612217#M55649</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2021-09-09T23:27:41Z</dc:date>
    </item>
    <item>
      <title>Re: Converting 2D Polyline to 3D Polyline without losing Object Data</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/converting-2d-polyline-to-3d-polyline-without-losing-object-data/m-p/10632877#M55650</link>
      <description>&lt;P&gt;C3D does the job but only works on one table.&lt;BR /&gt;I therefore offer you a similar function ...&lt;BR /&gt;She converts a lwpolyline to 3Dpolyline&lt;BR /&gt;If the light polyline has:&lt;BR /&gt;- arcs, these are discretized. (1/36 of pi)&lt;BR /&gt;- an elevation, this one is used to produce the Z for the 3Dpolyline.&lt;BR /&gt;- xdata, these are transferred.&lt;BR /&gt;- one or more Object Data tables, they are transferred.&lt;BR /&gt;- data of objects containing several records are also transferred.&lt;/P&gt;&lt;P&gt;This function works (normally) also on a classic autocad for xdata if you don't have Map or Civil (of course the OD will not be processed)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="general"&gt;(vl-load-com)
(defun def_bulg_pl (ls lb flag_closed / ls lb rad a l_new)
  (if (not (zerop flag_closed)) (setq ls (append ls (list (car ls)))))
  (while (cadr ls)
    (if (zerop (car lb))
      (setq l_new (append l_new (list (car ls))))
      (progn
        (setq
          rad (/ (distance (car ls) (cadr ls)) (sin (* 2.0 (atan (abs (car lb))))) 2.0)
          a (- (/ pi 2.0) (- pi (* 2.0 (atan (abs (car lb))))))
        )
        (if (&amp;lt; a 0.0) (setq a (- (* 2.0 pi) a)))
        (if (or (and (&amp;lt; (car lb) 0.0) (&amp;gt; (car lb) -1.0)) (&amp;gt; (car lb) 1.0))
          (setq l_new (append l_new (reverse (cdr (reverse (bulge_pts (polar (car ls) (- (angle (car ls) (cadr ls)) a) rad) (car ls) (cadr ls) rad (car lb)))))))
          (setq l_new (append l_new (reverse (cdr (reverse (bulge_pts (polar (car ls) (+ (angle (car ls) (cadr ls)) a) rad) (car ls) (cadr ls) rad (car lb)))))))
        )
      )
    )
    (setq ls (cdr ls) lb (cdr lb))
  )
  (append l_new (list (car ls)))
)
(defun bulge_pts (pt_cen pt_begin pt_end rad sens / inc ang nm p lst)
  (setq
    inc (angle pt_cen (if (&amp;lt; sens 0.0) pt_end pt_begin))
    ang (+ (* 2.0 pi) (angle pt_cen (if (&amp;lt; sens 0.0) pt_begin pt_end)))
    nm (1- (fix (/ (rem (- ang inc) (* 2.0 pi)) (/ (* pi 2.0) 36.0))))
    lst (list (polar pt_cen inc rad))
  )
  (repeat nm
    (setq
      inc (+ inc (/ (* pi 2.0) 36.0))
      p (polar pt_cen inc rad)
      lst (append lst (list p))
    )
  )
  (setq
    p (polar pt_cen ang rad)
    lst (append lst (list p))
  )
  (if (&amp;lt; sens 0.0) (reverse lst) lst)
)
(defun c:lwto3dpoly ( / js AcDoc Space n ent dxf_ent name_layer xd_l closed lst l_bulg nwent tbldef lst_data)
  (princ "\nSelect the light polylines to convert to 3D: ")
  (setq js
    (ssget
      (list
        (cons 0 "LWPOLYLINE")
        (cons 67 (if (eq (getvar "CVPORT") 2) 0 1))
        (cons 410 (if (eq (getvar "CVPORT") 2) "Model" (getvar "CTAB")))
      )
    )
  )
  (cond
    (js
      (setq
        AcDoc (vla-get-ActiveDocument (vlax-get-acad-object))
        Space
        (if (eq (getvar "CVPORT") 1)
          (vla-get-PaperSpace AcDoc)
          (vla-get-ModelSpace AcDoc)
        )
      )
      (repeat (setq n (sslength js))
        (setq
          ent (ssname js (setq n (1- n)))
          dxf_ent (entget ent '("*"))
          name_layer (cdr (assoc 8 dxf_ent))
          xd_l (assoc -3 dxf_ent)
          closed (boole 1 (cdr (assoc 70 dxf_ent)) 1)
          lst (mapcar '(lambda (x) (trans x ent 1)) (mapcar 'cdr (vl-remove-if '(lambda (x) (/= (car x) 10)) dxf_ent)))
          l_bulg (mapcar 'cdr (vl-remove-if '(lambda (x) (/= (car x) 42)) dxf_ent))
          lst (def_bulg_pl (mapcar '(lambda (x) (list (car x) (cadr x) (cdr (assoc 38 dxf_ent)))) lst) l_bulg closed)
        )
        (if
          (or
            (numberp (vl-string-search "Map 3D" (vla-get-caption (vlax-get-acad-object))))
            (numberp (vl-string-search "Civil 3D" (vla-get-caption (vlax-get-acad-object))))
          )
          (progn
            (cond
              ((listp (ade_odgettables ent))
                (foreach n_od (ade_odgettables ent)
                  (setq tbldef (ade_odtabledefn n_od))
                  (setq lst_data
                    (cons
                      (mapcar
                        '(lambda (fld / tmp_rec numrec)
                          (setq numrec (ade_odrecordqty ent n_od))
                          (cons
                            n_od
                            (while (not (zerop numrec))
                              (setq numrec (1- numrec))
                              (if (zerop numrec)
                                (if tmp_rec
                                  (cons fld (list (cons (ade_odgetfield ent n_od fld numrec) tmp_rec)))
                                  (cons fld (ade_odgetfield ent n_od fld numrec))
                                )
                                (setq tmp_rec (cons (ade_odgetfield ent n_od fld numrec) tmp_rec))
                              )
                            )
                          )
                        )
                        (mapcar 'cdar (cdaddr tbldef))
                      )
                      lst_data
                    )
                  )
                )
              )
              (T (setq lst_data nil))
            )
          )
          (setq lst_data nil)
        )
        (if (not (zerop closed)) (setq lst (reverse (cdr (reverse lst)))))
        (vla-put-Closed (vlax-invoke Space 'Add3dPoly (apply 'append lst)) closed)
        (setq nwent (entlast))
        (if xd_l
          (entmod (append (entget nwent) (list xd_l)))
        )
        (cond
          (lst_data
            (mapcar
              '(lambda (x / ct)
                (while (&amp;lt; (ade_odrecordqty nwent (caar x)) (ade_odrecordqty ent (caar x)))
                  (ade_odaddrecord nwent (caar x))
                )
                (foreach el (mapcar 'cdr x)
                  (if (listp (cdr el))
                    (progn
                      (setq ct -1)
                      (mapcar
                        '(lambda (y / )
                          (ade_odsetfield nwent (caar x) (car el) (setq ct (1+ ct)) y)
                        )
                        (cadr el)
                      )
                    )
                    (ade_odsetfield nwent (caar x) (car el) 0 (cdr el))
                  )
                )
              )
              lst_data
            )
            (setq lst_data nil)
          )
        )
        (vla-put-Layer (vlax-ename-&amp;gt;vla-object nwent) name_layer)
        (entdel ent)
      )
    )
  )
  (prin1)
)&lt;/LI-CODE&gt;</description>
      <pubDate>Sun, 19 Sep 2021 18:12:09 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/converting-2d-polyline-to-3d-polyline-without-losing-object-data/m-p/10632877#M55650</guid>
      <dc:creator>CADaSchtroumpf</dc:creator>
      <dc:date>2021-09-19T18:12:09Z</dc:date>
    </item>
    <item>
      <title>Re: Converting 2D Polyline to 3D Polyline without losing Object Data</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/converting-2d-polyline-to-3d-polyline-without-losing-object-data/m-p/10633714#M55651</link>
      <description>&lt;P&gt;Hello Bruno &lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/524107"&gt;@CADaSchtroumpf&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;BRAVO !!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The Health, Bye, Patrice&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 20 Sep 2021 09:01:01 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/converting-2d-polyline-to-3d-polyline-without-losing-object-data/m-p/10633714#M55651</guid>
      <dc:creator>braudpat</dc:creator>
      <dc:date>2021-09-20T09:01:01Z</dc:date>
    </item>
    <item>
      <title>Re: Converting 2D Polyline to 3D Polyline without losing Object Data</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/converting-2d-polyline-to-3d-polyline-without-losing-object-data/m-p/10635254#M55652</link>
      <description>&lt;P&gt;Hi, Bruno,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;While looked in Map/Civil - XD or OD saved all!&lt;/P&gt;&lt;P&gt;(I can't check in the base AutoCAD yet).&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;But one small wish is that other properties of polylines are preserved. Not only layers, but also colors, linetypes, weights, etc.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 20 Sep 2021 20:27:40 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/converting-2d-polyline-to-3d-polyline-without-losing-object-data/m-p/10635254#M55652</guid>
      <dc:creator>АлексЮстасу</dc:creator>
      <dc:date>2021-09-20T20:27:40Z</dc:date>
    </item>
    <item>
      <title>Re: Converting 2D Polyline to 3D Polyline without losing Object Data</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/converting-2d-polyline-to-3d-polyline-without-losing-object-data/m-p/10636620#M55653</link>
      <description>&lt;P&gt;Hi Alexander,&lt;/P&gt;&lt;P&gt;For transfert also this properties&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="general"&gt;(vl-load-com)
(defun def_bulg_pl (ls lb flag_closed / ls lb rad a l_new)
  (if (not (zerop flag_closed)) (setq ls (append ls (list (car ls)))))
  (while (cadr ls)
    (if (zerop (car lb))
      (setq l_new (append l_new (list (car ls))))
      (progn
        (setq
          rad (/ (distance (car ls) (cadr ls)) (sin (* 2.0 (atan (abs (car lb))))) 2.0)
          a (- (/ pi 2.0) (- pi (* 2.0 (atan (abs (car lb))))))
        )
        (if (&amp;lt; a 0.0) (setq a (- (* 2.0 pi) a)))
        (if (or (and (&amp;lt; (car lb) 0.0) (&amp;gt; (car lb) -1.0)) (&amp;gt; (car lb) 1.0))
          (setq l_new (append l_new (reverse (cdr (reverse (bulge_pts (polar (car ls) (- (angle (car ls) (cadr ls)) a) rad) (car ls) (cadr ls) rad (car lb)))))))
          (setq l_new (append l_new (reverse (cdr (reverse (bulge_pts (polar (car ls) (+ (angle (car ls) (cadr ls)) a) rad) (car ls) (cadr ls) rad (car lb)))))))
        )
      )
    )
    (setq ls (cdr ls) lb (cdr lb))
  )
  (append l_new (list (car ls)))
)
(defun bulge_pts (pt_cen pt_begin pt_end rad sens / inc ang nm p lst)
  (setq
    inc (angle pt_cen (if (&amp;lt; sens 0.0) pt_end pt_begin))
    ang (+ (* 2.0 pi) (angle pt_cen (if (&amp;lt; sens 0.0) pt_begin pt_end)))
    nm (1- (fix (/ (rem (- ang inc) (* 2.0 pi)) (/ (* pi 2.0) 36.0))))
    lst (list (polar pt_cen inc rad))
  )
  (repeat nm
    (setq
      inc (+ inc (/ (* pi 2.0) 36.0))
      p (polar pt_cen inc rad)
      lst (append lst (list p))
    )
  )
  (setq
    p (polar pt_cen ang rad)
    lst (append lst (list p))
  )
  (if (&amp;lt; sens 0.0) (reverse lst) lst)
)
(defun c:lwto3dpoly ( / js AcDoc Space n ent dxf_ent name_layer col typl scl wl xd_l closed lst l_bulg nwent tbldef lst_data obj)
  (princ "\n"\nSelect the light polylines to convert to 3D: ")
  (setq js
    (ssget
      (list
        (cons 0 "LWPOLYLINE")
        (cons 67 (if (eq (getvar "CVPORT") 2) 0 1))
        (cons 410 (if (eq (getvar "CVPORT") 2) "Model" (getvar "CTAB")))
      )
    )
  )
  (cond
    (js
      (setq
        AcDoc (vla-get-ActiveDocument (vlax-get-acad-object))
        Space
        (if (eq (getvar "CVPORT") 1)
          (vla-get-PaperSpace AcDoc)
          (vla-get-ModelSpace AcDoc)
        )
      )
      (repeat (setq n (sslength js))
        (setq
          ent (ssname js (setq n (1- n)))
          dxf_ent (entget ent '("*"))
          name_layer (cdr (assoc 8 dxf_ent))
          col (if (assoc 62 dxf_ent) (cdr (assoc 62 dxf_ent)) 256)
          typl (if (assoc 6 dxf_ent) (cdr (assoc 6 dxf_ent)) "BYLAYER")
          scl (if (assoc 48 dxf_ent) (cdr (assoc 48 dxf_ent)) 1.0)
          wl (if (assoc 370 dxf_ent) (cdr (assoc 370 dxf_ent)) -1)
          xd_l (assoc -3 dxf_ent)
          closed (boole 1 (cdr (assoc 70 dxf_ent)) 1)
          lst (mapcar '(lambda (x) (trans x ent 1)) (mapcar 'cdr (vl-remove-if '(lambda (x) (/= (car x) 10)) dxf_ent)))
          l_bulg (mapcar 'cdr (vl-remove-if '(lambda (x) (/= (car x) 42)) dxf_ent))
          lst (def_bulg_pl (mapcar '(lambda (x) (list (car x) (cadr x) (cdr (assoc 38 dxf_ent)))) lst) l_bulg closed)
        )
        (if
          (or
            (numberp (vl-string-search "Map 3D" (vla-get-caption (vlax-get-acad-object))))
            (numberp (vl-string-search "Civil 3D" (vla-get-caption (vlax-get-acad-object))))
          )
          (progn
            (cond
              ((listp (ade_odgettables ent))
                (foreach n_od (ade_odgettables ent)
                  (setq tbldef (ade_odtabledefn n_od))
                  (setq lst_data
                    (cons
                      (mapcar
                        '(lambda (fld / tmp_rec numrec)
                          (setq numrec (ade_odrecordqty ent n_od))
                          (cons
                            n_od
                            (while (not (zerop numrec))
                              (setq numrec (1- numrec))
                              (if (zerop numrec)
                                (if tmp_rec
                                  (cons fld (list (cons (ade_odgetfield ent n_od fld numrec) tmp_rec)))
                                  (cons fld (ade_odgetfield ent n_od fld numrec))
                                )
                                (setq tmp_rec (cons (ade_odgetfield ent n_od fld numrec) tmp_rec))
                              )
                            )
                          )
                        )
                        (mapcar 'cdar (cdaddr tbldef))
                      )
                      lst_data
                    )
                  )
                )
              )
              (T (setq lst_data nil))
            )
          )
          (setq lst_data nil)
        )
        (if (not (zerop closed)) (setq lst (reverse (cdr (reverse lst)))))
        (setq obj (vlax-invoke Space 'Add3dPoly (apply 'append lst)))
        (vla-put-Closed obj closed)
        (vla-put-Color obj col)
        (vla-put-Linetype obj typl)
        (vla-put-LinetypeScale obj scl)
        (vla-put-Lineweight obj wl)
        (setq nwent (entlast))
        (if xd_l
          (entmod (append (entget nwent) (list xd_l)))
        )
        (cond
          (lst_data
            (mapcar
              '(lambda (x / ct)
                (while (&amp;lt; (ade_odrecordqty nwent (caar x)) (ade_odrecordqty ent (caar x)))
                  (ade_odaddrecord nwent (caar x))
                )
                (foreach el (mapcar 'cdr x)
                  (if (listp (cdr el))
                    (progn
                      (setq ct -1)
                      (mapcar
                        '(lambda (y / )
                          (ade_odsetfield nwent (caar x) (car el) (setq ct (1+ ct)) y)
                        )
                        (cadr el)
                      )
                    )
                    (ade_odsetfield nwent (caar x) (car el) 0 (cdr el))
                  )
                )
              )
              lst_data
            )
            (setq lst_data nil)
          )
        )
        (vla-put-Layer (vlax-ename-&amp;gt;vla-object nwent) name_layer)
        (entdel ent)
      )
    )
  )
  (prin1)
)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 21 Sep 2021 10:55:36 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/converting-2d-polyline-to-3d-polyline-without-losing-object-data/m-p/10636620#M55653</guid>
      <dc:creator>CADaSchtroumpf</dc:creator>
      <dc:date>2021-09-21T10:55:36Z</dc:date>
    </item>
    <item>
      <title>Re: Converting 2D Polyline to 3D Polyline without losing Object Data</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/converting-2d-polyline-to-3d-polyline-without-losing-object-data/m-p/10636723#M55654</link>
      <description>&lt;P&gt;Hello &lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/524107"&gt;@CADaSchtroumpf&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;BRAVO !&lt;/P&gt;
&lt;P&gt;The Health, Bye, Patrice&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 21 Sep 2021 11:39:54 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/converting-2d-polyline-to-3d-polyline-without-losing-object-data/m-p/10636723#M55654</guid>
      <dc:creator>braudpat</dc:creator>
      <dc:date>2021-09-21T11:39:54Z</dc:date>
    </item>
    <item>
      <title>Re: Converting 2D Polyline to 3D Polyline without losing Object Data</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/converting-2d-polyline-to-3d-polyline-without-losing-object-data/m-p/12239929#M55655</link>
      <description>&lt;P&gt;Can you please share the name of the lisp cuz after loading the lisp iam not sure what is the name of the list to be entered in the command Box&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 14 Sep 2023 10:57:39 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/converting-2d-polyline-to-3d-polyline-without-losing-object-data/m-p/12239929#M55655</guid>
      <dc:creator>Dinesh_K214bad</dc:creator>
      <dc:date>2023-09-14T10:57:39Z</dc:date>
    </item>
    <item>
      <title>Re: Converting 2D Polyline to 3D Polyline without losing Object Data</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/converting-2d-polyline-to-3d-polyline-without-losing-object-data/m-p/12240029#M55656</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/14433148"&gt;@Dinesh_K214bad&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;Can you please share the name of the lisp cuz after loading the lisp iam not sure what is the name of the list to be entered in the command Box&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;The command name is always the part that follows the &lt;FONT color="#FF0000"&gt;&lt;STRONG&gt;C&lt;/STRONG&gt; and &lt;STRONG&gt;colon&lt;/STRONG&gt;&lt;/FONT&gt; in&lt;FONT face="courier new,courier"&gt;&lt;STRONG&gt;&lt;FONT color="#000000"&gt; (defun &lt;FONT size="4" color="#FF0000"&gt;C:&lt;/FONT&gt;&lt;FONT size="4" color="#33CCCC"&gt;&lt;EM&gt;ThisIsTheCommandName&lt;/EM&gt;&lt;/FONT&gt;&lt;/FONT&gt; &lt;/STRONG&gt;&lt;/FONT&gt;....&lt;/P&gt;
&lt;P&gt;In this case:&lt;/P&gt;
&lt;P&gt;&lt;FONT face="courier new,courier"&gt;&lt;STRONG&gt;&lt;FONT size="2"&gt;(defun &lt;FONT color="#FF0000"&gt;c:&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size="4" color="#0000FF"&gt;lwto3dpoly&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 14 Sep 2023 11:40:05 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/converting-2d-polyline-to-3d-polyline-without-losing-object-data/m-p/12240029#M55656</guid>
      <dc:creator>Kent1Cooper</dc:creator>
      <dc:date>2023-09-14T11:40:05Z</dc:date>
    </item>
    <item>
      <title>Re: Converting 2D Polyline to 3D Polyline without losing Object Data</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/converting-2d-polyline-to-3d-polyline-without-losing-object-data/m-p/12240155#M55657</link>
      <description>Hi buddy, iam not find the lips after loading this lisp but your previous lisp is working with the name u have mentioned. Please help me out cuz i have been trying to convert 2dpolyline to 3dlolyline without any change in object data and line properties</description>
      <pubDate>Thu, 14 Sep 2023 12:19:11 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/converting-2d-polyline-to-3d-polyline-without-losing-object-data/m-p/12240155#M55657</guid>
      <dc:creator>Dinesh_K214bad</dc:creator>
      <dc:date>2023-09-14T12:19:11Z</dc:date>
    </item>
    <item>
      <title>Re: Converting 2D Polyline to 3D Polyline without losing Object Data</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/converting-2d-polyline-to-3d-polyline-without-losing-object-data/m-p/12240212#M55658</link>
      <description>&lt;P&gt;the lisp mentioned in&amp;nbsp;&lt;STRONG&gt;MESSAGE 8 OF 15 is &lt;/STRONG&gt;working perfectly but it is not retaining line type. Please help me out with the lisp&lt;/P&gt;</description>
      <pubDate>Thu, 14 Sep 2023 12:40:08 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/converting-2d-polyline-to-3d-polyline-without-losing-object-data/m-p/12240212#M55658</guid>
      <dc:creator>Dinesh_K214bad</dc:creator>
      <dc:date>2023-09-14T12:40:08Z</dc:date>
    </item>
    <item>
      <title>Re: Converting 2D Polyline to 3D Polyline without losing Object Data</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/converting-2d-polyline-to-3d-polyline-without-losing-object-data/m-p/12240288#M55659</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/14433148"&gt;@Dinesh_K214bad&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;.... it is not retaining line type. ....&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;3D Polylines have never displayed non-continuous linetypes -- you can assign one, but it won't show that way.&lt;/P&gt;</description>
      <pubDate>Thu, 14 Sep 2023 13:05:25 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/converting-2d-polyline-to-3d-polyline-without-losing-object-data/m-p/12240288#M55659</guid>
      <dc:creator>Kent1Cooper</dc:creator>
      <dc:date>2023-09-14T13:05:25Z</dc:date>
    </item>
  </channel>
</rss>

