<?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: Code to interpret CDF files? in Visual LISP, AutoLISP and General Customization Forum</title>
    <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/code-to-interpret-cdf-files/m-p/7465488#M113213</link>
    <description>&lt;P&gt;Hello Ranjit,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;That looks very good - I don't understand how it works but it looks very promising.&amp;nbsp;&lt;/P&gt;&lt;P&gt;I've got to build it in to a routine that reads a CDF file with a few hundred lines and use the data to insert a block many times with different attributes.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks once again&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;George&lt;/P&gt;</description>
    <pubDate>Tue, 17 Oct 2017 01:03:09 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2017-10-17T01:03:09Z</dc:date>
    <item>
      <title>Code to interpret CDF files?</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/code-to-interpret-cdf-files/m-p/7465268#M113211</link>
      <description>&lt;P&gt;Hello there,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Does anyone have some lisp code to interpret a CDF file and extract the fields (as separate text strings?).&lt;/P&gt;&lt;P&gt;I need to do this to insert blocks at coordinates and supply attributes where these parameters are in the CDF file.&amp;nbsp; My attempts to date have not been successful - for example I"m having trouble working out how to deal with data in this format quote&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;STRONG&gt;"\"1\",\"LED_A\",\"120001\",\"0\",\"1.000\",\"3.200\",\"5.400\",\"0\",\"0\"" unquote -&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;the commas separate the fields.&amp;nbsp; This data has come from a CDF and processed by Microsoft's published VBA routine&amp;nbsp;&lt;/P&gt;&lt;P&gt;"Procedure to export a text file with both comma and quote delimiters in Excel"&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT size="3"&gt;Any help greatly appreciated.&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT size="3"&gt;Regards&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="3"&gt;George in New Zealand&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&lt;/STRONG&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 16 Oct 2017 23:04:16 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/code-to-interpret-cdf-files/m-p/7465268#M113211</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-10-16T23:04:16Z</dc:date>
    </item>
    <item>
      <title>Re: Code to interpret CDF files?</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/code-to-interpret-cdf-files/m-p/7465328#M113212</link>
      <description>&lt;P&gt;I assume you mean comma delimited file. Maybe&amp;nbsp;start from below function&lt;/P&gt;
&lt;PRE&gt;(defun somefunc  (lst / rxobj lst)
 (setq rxobj (vlax-get-or-create-object "vbscript.regexp"))
 (vlax-put rxobj 'pattern ",")
 (vlax-put rxobj 'global :vlax-true)
 (setq lst (vlax-invoke rxobj 'replace lst " "))
 (vlax-release-object rxobj)
 (read (strcat "(" lst ")")))&lt;/PRE&gt;
&lt;P&gt;You can extract the members from the list, assign them to multiple variables etc. Make sure to set and release the regxobj only once in your overall function.&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="str_2_lst.gif" style="width: 600px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/413722i90F9F18F1F427462/image-size/large?v=v2&amp;amp;px=999" role="button" title="str_2_lst.gif" alt="str_2_lst.gif" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 16 Oct 2017 23:38:02 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/code-to-interpret-cdf-files/m-p/7465328#M113212</guid>
      <dc:creator>Ranjit_Singh</dc:creator>
      <dc:date>2017-10-16T23:38:02Z</dc:date>
    </item>
    <item>
      <title>Re: Code to interpret CDF files?</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/code-to-interpret-cdf-files/m-p/7465488#M113213</link>
      <description>&lt;P&gt;Hello Ranjit,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;That looks very good - I don't understand how it works but it looks very promising.&amp;nbsp;&lt;/P&gt;&lt;P&gt;I've got to build it in to a routine that reads a CDF file with a few hundred lines and use the data to insert a block many times with different attributes.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks once again&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;George&lt;/P&gt;</description>
      <pubDate>Tue, 17 Oct 2017 01:03:09 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/code-to-interpret-cdf-files/m-p/7465488#M113213</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-10-17T01:03:09Z</dc:date>
    </item>
  </channel>
</rss>

