<?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 What is a good way to create mleaders from a *.csv file? in Visual LISP, AutoLISP and General Customization Forum</title>
    <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/what-is-a-good-way-to-create-mleaders-from-a-csv-file/m-p/5813303#M138510</link>
    <description>&lt;P&gt;I want to open this csv file, and have it draw a multileader at each x,y coordinate using each additional comma separated value as a new line in the multileader.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can someone point me in the right direction?&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I attached a file of my example.&amp;nbsp; Number of lines in the text file could be arbitrarily long.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you,&lt;/P&gt;</description>
    <pubDate>Fri, 11 Sep 2015 17:55:04 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2015-09-11T17:55:04Z</dc:date>
    <item>
      <title>What is a good way to create mleaders from a *.csv file?</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/what-is-a-good-way-to-create-mleaders-from-a-csv-file/m-p/5813303#M138510</link>
      <description>&lt;P&gt;I want to open this csv file, and have it draw a multileader at each x,y coordinate using each additional comma separated value as a new line in the multileader.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can someone point me in the right direction?&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I attached a file of my example.&amp;nbsp; Number of lines in the text file could be arbitrarily long.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you,&lt;/P&gt;</description>
      <pubDate>Fri, 11 Sep 2015 17:55:04 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/what-is-a-good-way-to-create-mleaders-from-a-csv-file/m-p/5813303#M138510</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2015-09-11T17:55:04Z</dc:date>
    </item>
    <item>
      <title>Re: What is a good way to create mleaders from a *.csv file?</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/what-is-a-good-way-to-create-mleaders-from-a-csv-file/m-p/5813729#M138511</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;@Anonymous wrote:&lt;BR /&gt;
&lt;P&gt;... and have it draw a multileader at each x,y coordinate ...&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Hi smay8399,&lt;/P&gt;
&lt;P&gt;you only have one point per text line, is your mleaderstyle &lt;SPAN class="hps"&gt;defined without &lt;SPAN class="hps"&gt;leader&lt;/SPAN&gt;, only text?&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN class="hps"&gt;Or are you going to calculate the second point from the&amp;nbsp;that point?&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN class="hps"&gt;Henrique&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 11 Sep 2015 22:51:09 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/what-is-a-good-way-to-create-mleaders-from-a-csv-file/m-p/5813729#M138511</guid>
      <dc:creator>hmsilva</dc:creator>
      <dc:date>2015-09-11T22:51:09Z</dc:date>
    </item>
    <item>
      <title>Re: What is a good way to create mleaders from a *.csv file?</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/what-is-a-good-way-to-create-mleaders-from-a-csv-file/m-p/5813752#M138512</link>
      <description>I want to calculate the leader and the landing from the first point. The X,Y point is the center of a manhole or other items of interest on the drawing. I have an excel sheet that I'm exporting the *.csv from</description>
      <pubDate>Fri, 11 Sep 2015 23:09:42 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/what-is-a-good-way-to-create-mleaders-from-a-csv-file/m-p/5813752#M138512</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2015-09-11T23:09:42Z</dc:date>
    </item>
    <item>
      <title>Re: What is a good way to create mleaders from a *.csv file?</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/what-is-a-good-way-to-create-mleaders-from-a-csv-file/m-p/5813764#M138513</link>
      <description>&lt;P&gt;Untested...&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;(defun c:demo (/ *error* parse file fname line lst pt str x y)
   
   (defun *error* (msg)
      (if file
         (close file)
      )
      (cond ((not msg))
            ((member msg '("Function cancelled" "quit / exit abort")))
            ((princ (strcat "\n** Error: " msg " ** ")))
      )
      (princ)
   )

   (defun parse (str del / lst pos)
      (while (setq pos (vl-string-search del str))
         (setq lst (cons (substr str 1 pos) lst)
               str (substr str (+ pos 2))
         )
      )
      (reverse lst)
   )

   (if (and (setq fname (getfiled "" "" "csv" 8))
            (setq file (open fname "r"))
       )
      (progn
         (read-line file) ; to remove the header
         (while (setq line (read-line file))
            (setq lst (parse line ",")
                  x   (atoi (car lst))
                  lst (cdr lst)
                  y   (atoi (car lst))
                  lst (cdr lst)
                  pt  (list x y)
                  str (vl-string-right-trim
                         "\\P"
                         (apply 'strcat (mapcar (function (lambda (x) (strcat x "\\P"))) lst))
                      )
            )
            (command "mleader" pt (polar pt (* pi 0.25) 50.0) str); change the polar point...
         )
      )
   )
   (*error* nil)
   (princ)
)&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Hope this helps, &lt;BR /&gt;Henrique&lt;/P&gt;</description>
      <pubDate>Fri, 11 Sep 2015 23:30:49 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/what-is-a-good-way-to-create-mleaders-from-a-csv-file/m-p/5813764#M138513</guid>
      <dc:creator>hmsilva</dc:creator>
      <dc:date>2015-09-11T23:30:49Z</dc:date>
    </item>
    <item>
      <title>Re: What is a good way to create mleaders from a *.csv file?</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/what-is-a-good-way-to-create-mleaders-from-a-csv-file/m-p/5813775#M138514</link>
      <description>&lt;P&gt;Thanks, that helps a lot.&amp;nbsp; I will post my final lisp file when it is done.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 12 Sep 2015 00:01:00 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/what-is-a-good-way-to-create-mleaders-from-a-csv-file/m-p/5813775#M138514</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2015-09-12T00:01:00Z</dc:date>
    </item>
    <item>
      <title>Re: What is a good way to create mleaders from a *.csv file?</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/what-is-a-good-way-to-create-mleaders-from-a-csv-file/m-p/5813784#M138515</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;@Anonymous wrote:&lt;BR /&gt;
&lt;P&gt;Thanks, that helps a lot.&amp;nbsp; I will post my final lisp file when it is done.&amp;nbsp;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;You're welcome!&lt;BR /&gt;Glad I could help&lt;BR /&gt;&lt;BR /&gt;Henrique&lt;/P&gt;</description>
      <pubDate>Sat, 12 Sep 2015 00:12:50 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/what-is-a-good-way-to-create-mleaders-from-a-csv-file/m-p/5813784#M138515</guid>
      <dc:creator>hmsilva</dc:creator>
      <dc:date>2015-09-12T00:12:50Z</dc:date>
    </item>
  </channel>
</rss>

