<?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: Help Modifing Mac Lee's PolyInfo to select multiple objects and export to cs in Visual LISP, AutoLISP and General Customization Forum</title>
    <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/help-modifing-mac-lee-s-polyinfo-to-select-multiple-objects-and/m-p/12115844#M76060</link>
    <description>&lt;P&gt;Hello your lisp works very well. I'm having trouble exporting the length of the polylines instead of the vertices. How could I modify your script to do this task? I tried to use your lisp and calculate the linear distance between the vertices. However, I have noticed that in my .dwg file I have some polylines that are made up of arcs and it is no longer correct to obtain the distances in this way.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Could you tell me how to directly obtain the length of the polylines instead of the vertices. Thank you very much in advance.&lt;/P&gt;</description>
    <pubDate>Thu, 20 Jul 2023 21:02:11 GMT</pubDate>
    <dc:creator>edwar_emqs</dc:creator>
    <dc:date>2023-07-20T21:02:11Z</dc:date>
    <item>
      <title>Help Modifing Mac Lee's PolyInfo to select multiple objects and export to csv.</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/help-modifing-mac-lee-s-polyinfo-to-select-multiple-objects-and/m-p/9434352#M76052</link>
      <description>&lt;P&gt;Hello to the forum,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am trying to use exported coordinates of selected polygons (mostly triangles) and parse them into python for calculations. This is a result of my zero knowledge for lisp, thus I am using python for a long time, but I haven't managed to select and extract coordinates of multiple objects via a python package.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;polyinfo.lsp prompts a txt with data of one and only selected polyline, and the exported format is what i need.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can someone help me and modify that lisp for multiple selection of polylines? Then save data to a csv or a txt automatically.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any help is really apreciated,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 10 Apr 2020 11:58:42 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/help-modifing-mac-lee-s-polyinfo-to-select-multiple-objects-and/m-p/9434352#M76052</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-04-10T11:58:42Z</dc:date>
    </item>
    <item>
      <title>Re: Help Modifing Mac Lee's PolyInfo to select multiple objects and export to cs</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/help-modifing-mac-lee-s-polyinfo-to-select-multiple-objects-and/m-p/9434628#M76053</link>
      <description>&lt;P&gt;What kind of polylines you are dealing with, only lwpolylines or a old polyline&amp;nbsp; i.e. 3dpolyline, or maybe even a spline. Extraction and export to txt file is easy to do. If we talk lwpolylines that are placed in a horizontal plane and eventually have set elevation each point in defined&amp;nbsp; as (x y)&amp;nbsp; but can also be exported in a form (x y z). When you have closed polygon, do you need last point to be equal to first one.&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;(defun c:mpolyout ( / *error* mappend mklist flatten ss k i j ent pp pts points_all f file1 lst str decimals)
; exports multiple lwpolylines vertexes to txt file 
; hak_vz (https://forums.autodesk.com/t5/user/viewprofilepage/user-id/5530556)
; 10.04.2020.

(defun *error* (msg)
    (if (not (wcmatch (strcase msg) "*BREAK*,*CANCEL*,*EXIT*"))
    (progn
       (princ (strcat "\nOops an Error : ( " msg " ) occurred."))
    )
    ) 
    (princ)
)
(defun mappend (fn lst)(apply 'append (mapcar fn lst)))
(defun mklist (x) (if (listp x) x (list x)))
(defun flatten (e)(mappend 'mklist e))

    (princ "\nSelect polylines to export")

    (setq ss (ssget '((0 . "lwpolyline"))))
    (cond 
        ((and ss)
            (setq k 0)
            (while (&amp;lt; k (sslength ss))
                (setq ent (entget (ssname ss k)) pts nil i 0)
                (repeat (length ent) (setq pp (nth i ent))(if (= (car pp) 10) (setq pts (cons (cdr pp) pts))) (setq i (+ i 1)))
                (setq pts (reverse pts))
                (setq points_all (cons pts points_all))
                (setq k (+ k 1) i 0)
            )
        )
    )
    (setq f (getfiled "Exit file to write polyline points:" (getvar "dwgprefix") "txt" 3))
    (setq file1 (open f "w"))
    (setq decimals (getint "\nNumber of decimal places &amp;gt;") i 0)
        (while (&amp;lt; i (length points_all))
            (setq lst (flatten (nth i points_all)) j 0 delimiter "," str "")
            (while (&amp;lt; j (- (length lst) 1))(setq str (strcat str (rtos (nth j lst) 2 decimals) delimiter))(setq j (+ j 1)))
            (setq str (strcat str (rtos (last lst) 2 decimals)))
            (write-line str file1)
            (setq i (+ i 1)) 
        )
    (princ "Done!")
    (close file1)
    (princ)
)
(princ "\n command MPOLYOUT exports polygon points to file")
(princ)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 10 Apr 2020 14:07:41 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/help-modifing-mac-lee-s-polyinfo-to-select-multiple-objects-and/m-p/9434628#M76053</guid>
      <dc:creator>hak_vz</dc:creator>
      <dc:date>2020-04-10T14:07:41Z</dc:date>
    </item>
    <item>
      <title>Re: Help Modifing Mac Lee's PolyInfo to select multiple objects and export to cs</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/help-modifing-mac-lee-s-polyinfo-to-select-multiple-objects-and/m-p/9434667#M76054</link>
      <description>&lt;P&gt;Thanks for the fast reply hac_vz!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am dealing with polylines or&amp;nbsp;&lt;SPAN&gt;lwpolylines (closed or not) in a XY Plane.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;That works fine but is it possible to have e.g for a triangle 3 coordinates delimeted by (;), for a rectangle 4 cordinates, for a polygon n&amp;nbsp; coordinates and ommit the closing coordinate that is the same?&lt;/P&gt;</description>
      <pubDate>Fri, 10 Apr 2020 14:29:34 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/help-modifing-mac-lee-s-polyinfo-to-select-multiple-objects-and/m-p/9434667#M76054</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-04-10T14:29:34Z</dc:date>
    </item>
    <item>
      <title>Re: Help Modifing Mac Lee's PolyInfo to select multiple objects and export to cs</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/help-modifing-mac-lee-s-polyinfo-to-select-multiple-objects-and/m-p/9434674#M76055</link>
      <description>&lt;P&gt;Working on it&lt;/P&gt;</description>
      <pubDate>Fri, 10 Apr 2020 14:36:45 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/help-modifing-mac-lee-s-polyinfo-to-select-multiple-objects-and/m-p/9434674#M76055</guid>
      <dc:creator>hak_vz</dc:creator>
      <dc:date>2020-04-10T14:36:45Z</dc:date>
    </item>
    <item>
      <title>Re: Help Modifing Mac Lee's PolyInfo to select multiple objects and export to cs</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/help-modifing-mac-lee-s-polyinfo-to-select-multiple-objects-and/m-p/9434720#M76056</link>
      <description>&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="1.PNG" style="width: 200px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/752401i31D2C818DE63C661/image-size/small?v=v2&amp;amp;px=200" role="button" title="1.PNG" alt="1.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Thats the export of a triangle! 4 coordinates!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank for your&amp;nbsp; fast replies!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm sorry but I have edited the post before you replied &lt;span class="lia-unicode-emoji" title=":grinning_face_with_smiling_eyes:"&gt;😄&lt;/span&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 10 Apr 2020 14:43:29 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/help-modifing-mac-lee-s-polyinfo-to-select-multiple-objects-and/m-p/9434720#M76056</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-04-10T14:43:29Z</dc:date>
    </item>
    <item>
      <title>Re: Help Modifing Mac Lee's PolyInfo to select multiple objects and export to cs</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/help-modifing-mac-lee-s-polyinfo-to-select-multiple-objects-and/m-p/9434744#M76057</link>
      <description>&lt;P&gt;Can't you test this in python. Number of points depends about how you create object in acad. You can also change delimiter in a script or python. Same thing apply for point delimiter. I don't have time to work on it now, you were lucky that I had this script in my arsenal and were replying to other post. Sorry have to go out for a shopping.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 10 Apr 2020 14:53:48 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/help-modifing-mac-lee-s-polyinfo-to-select-multiple-objects-and/m-p/9434744#M76057</guid>
      <dc:creator>hak_vz</dc:creator>
      <dc:date>2020-04-10T14:53:48Z</dc:date>
    </item>
    <item>
      <title>Re: Help Modifing Mac Lee's PolyInfo to select multiple objects and export to cs</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/help-modifing-mac-lee-s-polyinfo-to-select-multiple-objects-and/m-p/9434761#M76058</link>
      <description>&lt;P&gt;You are right! Thank you for your time!&lt;/P&gt;</description>
      <pubDate>Fri, 10 Apr 2020 14:58:46 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/help-modifing-mac-lee-s-polyinfo-to-select-multiple-objects-and/m-p/9434761#M76058</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-04-10T14:58:46Z</dc:date>
    </item>
    <item>
      <title>Re: Help Modifing Mac Lee's PolyInfo to select multiple objects and export to cs</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/help-modifing-mac-lee-s-polyinfo-to-select-multiple-objects-and/m-p/9434798#M76059</link>
      <description>&lt;P&gt;Just before I go. When you create your polygons use option "close" instead of picking a last point at position of first point. That way for a triangle you'll receive only tree points.&lt;/P&gt;</description>
      <pubDate>Fri, 10 Apr 2020 15:11:07 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/help-modifing-mac-lee-s-polyinfo-to-select-multiple-objects-and/m-p/9434798#M76059</guid>
      <dc:creator>hak_vz</dc:creator>
      <dc:date>2020-04-10T15:11:07Z</dc:date>
    </item>
    <item>
      <title>Re: Help Modifing Mac Lee's PolyInfo to select multiple objects and export to cs</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/help-modifing-mac-lee-s-polyinfo-to-select-multiple-objects-and/m-p/12115844#M76060</link>
      <description>&lt;P&gt;Hello your lisp works very well. I'm having trouble exporting the length of the polylines instead of the vertices. How could I modify your script to do this task? I tried to use your lisp and calculate the linear distance between the vertices. However, I have noticed that in my .dwg file I have some polylines that are made up of arcs and it is no longer correct to obtain the distances in this way.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Could you tell me how to directly obtain the length of the polylines instead of the vertices. Thank you very much in advance.&lt;/P&gt;</description>
      <pubDate>Thu, 20 Jul 2023 21:02:11 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/help-modifing-mac-lee-s-polyinfo-to-select-multiple-objects-and/m-p/12115844#M76060</guid>
      <dc:creator>edwar_emqs</dc:creator>
      <dc:date>2023-07-20T21:02:11Z</dc:date>
    </item>
  </channel>
</rss>

