<?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: lisp tool for exporting coordinates (nr, x, y, z) tot txt by selecting multiple polylines in Visual LISP, AutoLISP and General Customization Forum</title>
    <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-tool-for-exporting-coordinates-nr-x-y-z-tot-txt-by/m-p/10814370#M51421</link>
    <description>&lt;P&gt;Try Plt by Lee Mac for starters.&lt;/P&gt;</description>
    <pubDate>Fri, 10 Dec 2021 12:32:16 GMT</pubDate>
    <dc:creator>АлексЮстасу</dc:creator>
    <dc:date>2021-12-10T12:32:16Z</dc:date>
    <item>
      <title>lisp tool for exporting coordinates (nr, x, y, z) tot txt by selecting multiple polylines</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-tool-for-exporting-coordinates-nr-x-y-z-tot-txt-by/m-p/10814242#M51420</link>
      <description>&lt;P&gt;Is there a LISP-tool that exports coordinates from selected multiple polylines to a txt-file (number, x, y, z).&lt;/P&gt;&lt;P&gt;The numbers need to be unique.&lt;/P&gt;&lt;P&gt;Lets say i have 3 adjacent rectangles, after selecting them the program generates a txt file with the data but the numbers need to be unique, so in stead of 12 numbers you get 8 numbers in this case.&lt;/P&gt;&lt;P&gt;a possibilty to choose the delimiter (space, tab, comma,...) and the number of digits behind the decimal point.&lt;/P&gt;&lt;P&gt;the decimal point needs to be a '." instead of a ","&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;thanks&lt;/P&gt;</description>
      <pubDate>Fri, 10 Dec 2021 11:31:14 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-tool-for-exporting-coordinates-nr-x-y-z-tot-txt-by/m-p/10814242#M51420</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2021-12-10T11:31:14Z</dc:date>
    </item>
    <item>
      <title>Re: lisp tool for exporting coordinates (nr, x, y, z) tot txt by selecting multiple polylines</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-tool-for-exporting-coordinates-nr-x-y-z-tot-txt-by/m-p/10814370#M51421</link>
      <description>&lt;P&gt;Try Plt by Lee Mac for starters.&lt;/P&gt;</description>
      <pubDate>Fri, 10 Dec 2021 12:32:16 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-tool-for-exporting-coordinates-nr-x-y-z-tot-txt-by/m-p/10814370#M51421</guid>
      <dc:creator>АлексЮстасу</dc:creator>
      <dc:date>2021-12-10T12:32:16Z</dc:date>
    </item>
    <item>
      <title>Re: lisp tool for exporting coordinates (nr, x, y, z) tot txt by selecting multiple polylines</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-tool-for-exporting-coordinates-nr-x-y-z-tot-txt-by/m-p/10814504#M51422</link>
      <description>&lt;P&gt;Thank you,&lt;/P&gt;&lt;P&gt;I asume that "plt" is the command you type in Autocad, but what is the programname.&lt;/P&gt;&lt;P&gt;I can't find it on his website.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks again.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 10 Dec 2021 13:42:15 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-tool-for-exporting-coordinates-nr-x-y-z-tot-txt-by/m-p/10814504#M51422</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2021-12-10T13:42:15Z</dc:date>
    </item>
    <item>
      <title>Re: lisp tool for exporting coordinates (nr, x, y, z) tot txt by selecting multiple polylines</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-tool-for-exporting-coordinates-nr-x-y-z-tot-txt-by/m-p/10814625#M51423</link>
      <description>&lt;P&gt;Excuse me!&lt;BR /&gt;I was wrong - PtM, &lt;A href="http://www.lee-mac.com/ptmanager.html" target="_blank" rel="noopener"&gt;http://www.lee-mac.com/ptmanager.html&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I think you will find many options by searching.&lt;BR /&gt;You can look in the AppStore.&lt;BR /&gt;For example, there is a very powerful Geo_Export /Geo_Import by BearDyugin, 30 days free.&lt;BR /&gt;(I think there are many others, and this one I just know - Russian author).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 10 Dec 2021 14:58:32 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-tool-for-exporting-coordinates-nr-x-y-z-tot-txt-by/m-p/10814625#M51423</guid>
      <dc:creator>АлексЮстасу</dc:creator>
      <dc:date>2021-12-10T14:58:32Z</dc:date>
    </item>
    <item>
      <title>Re: lisp tool for exporting coordinates (nr, x, y, z) tot txt by selecting multiple polylines</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-tool-for-exporting-coordinates-nr-x-y-z-tot-txt-by/m-p/10814688#M51424</link>
      <description>&lt;P&gt;@Anonymous&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Here's something quick. Driven by textsize or luprec sysvars.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;HTH&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;(vl-load-com)

(defun c:Pl2CSV ( / *error* f LM:UniqueFuzz x s n l i h)
  
  (defun *error* (errmsg)
    (if (not (wcmatch errmsg "Function cancelled,quit / exit abort,console break,end"))
      (princ (strcat "\nError: " errmsg)))
    (if f (close f))
    (princ))
  
  ;; Unique with Fuzz  -  Lee Mac  
  (defun LM:UniqueFuzz ( l f ) (if l (cons (car l) (LM:UniqueFuzz (vl-remove-if '(lambda (x) (equal x (car l) f)) (cdr l)) f))))
  
  (if (and (setq s (ssget '((0 . "LWPOLYLINE"))))
	   (setq n (cond ((getint "\nStart number &amp;lt;1&amp;gt;: ")) (1)))
	   (setq n (1- n))
	   (setq l (vl-remove-if 'listp (mapcar 'cadr (ssnamex s))))
	   (setq l (apply 'append
			  (mapcar '(lambda (x) (mapcar '(lambda (y) (reverse (cons (cdr (assoc 38 (entget x))) (reverse (cdr y)))))
						       (vl-remove-if-not '(lambda (c) (= 10 (car c))) (entget x))))
				  l)))
	   (setq l (LM:UniqueFuzz l 1e-6))
	   (setq f (open (strcat (getvar 'DWGPREFIX) (vl-string-right-trim ".dwg" (getvar 'DWGNAME)) "-PlExport.csv") "a"))
	   (write-line "n,x,y,z" f)
	   (setq i -1)
	   (setq h (getvar 'textsize))
	   )
    (foreach p l
      (setq n (1+ n))
      (entmakex (list '(0 . "TEXT") (cons 10 p) (cons 40 h) (cons 1 (itoa n))))
      (setq x (strcat (itoa n) ","
		      (rtos (car p) 2) ","
		      (rtos (cadr p) 2) ","
		      (rtos (last p) 2)))
      (write-line x f)))
  (*error* "end")
  )
&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Edit: updated to fix elevations.&lt;/P&gt;</description>
      <pubDate>Sat, 11 Dec 2021 16:04:18 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-tool-for-exporting-coordinates-nr-x-y-z-tot-txt-by/m-p/10814688#M51424</guid>
      <dc:creator>ВeekeeCZ</dc:creator>
      <dc:date>2021-12-11T16:04:18Z</dc:date>
    </item>
    <item>
      <title>Re: lisp tool for exporting coordinates (nr, x, y, z) tot txt by selecting multiple polylines</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-tool-for-exporting-coordinates-nr-x-y-z-tot-txt-by/m-p/10816029#M51425</link>
      <description>&lt;P&gt;This is almost perfect.&lt;/P&gt;&lt;P&gt;Altough there is a problem with the z-coord: the z-coord is the same as the y-coord.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is there a possibility to choose between space or tab as&amp;nbsp; delimiter?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Many thanks&lt;/P&gt;</description>
      <pubDate>Sat, 11 Dec 2021 08:43:43 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-tool-for-exporting-coordinates-nr-x-y-z-tot-txt-by/m-p/10816029#M51425</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2021-12-11T08:43:43Z</dc:date>
    </item>
  </channel>
</rss>

