<?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: autolisp code to read/write file of 32 bit integer int32 in Visual LISP, AutoLISP and General Customization Forum</title>
    <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/autolisp-code-to-read-write-file-of-32-bit-integer-int32/m-p/13334125#M2836</link>
    <description>&lt;P&gt;&lt;BR /&gt;;using the WriteBinaryStream ::::&lt;/P&gt;&lt;P&gt;(defun LM:WriteBinaryStream ( filename data&lt;BR /&gt;/&lt;BR /&gt;ADOStream result&lt;BR /&gt;)&lt;BR /&gt;(setq result&lt;BR /&gt;(vl-catch-all-apply&lt;BR /&gt;(function&lt;BR /&gt;(lambda ( )&lt;BR /&gt;(setq ADOStream (vlax-create-object "ADODB.Stream"))&lt;BR /&gt;(vlax-put-property ADOStream 'type 1)&lt;BR /&gt;(vlax-invoke ADOStream 'open)&lt;BR /&gt;(vlax-invoke-method ADOStream 'write data)&lt;BR /&gt;(vlax-invoke ADOStream 'savetofile filename 2)&lt;BR /&gt;)&lt;BR /&gt;)&lt;BR /&gt;)&lt;BR /&gt;)&lt;BR /&gt;(if ADOStream (vlax-release-object ADOStream))&lt;BR /&gt;(if (not (vl-catch-all-error-p result))&lt;BR /&gt;file&lt;BR /&gt;)&lt;BR /&gt;)&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;(defun c:test ( /&lt;BR /&gt;filename&lt;BR /&gt;aDataVar&lt;BR /&gt;)&lt;BR /&gt;(setq filename "C:/test.bin")&lt;BR /&gt;(princ (vl-file-size filename))&lt;BR /&gt;(princ)&lt;BR /&gt;(setq aDataVar 123456789 )&lt;BR /&gt;(LM:WriteBinaryStream&lt;BR /&gt;aDataVar&lt;BR /&gt;filename&lt;BR /&gt;)&lt;BR /&gt;(princ "\nSTORED TO DISK ")&lt;BR /&gt;(princ "\n")&lt;BR /&gt;(princ (vl-file-size filename))&lt;BR /&gt;(princ)&lt;BR /&gt;)&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;;;; after TEST called test.bin filesize 0 (data not writed)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Sat, 22 Feb 2025 21:47:28 GMT</pubDate>
    <dc:creator>GeryKnee</dc:creator>
    <dc:date>2025-02-22T21:47:28Z</dc:date>
    <item>
      <title>autolisp code to read/write file of 32 bit integer int32</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/autolisp-code-to-read-write-file-of-32-bit-integer-int32/m-p/13333209#M2832</link>
      <description>&lt;P&gt;Hello everybody&lt;/P&gt;&lt;P&gt;a) About a list of 64 bit integer numbers (int64) , i want to store them to an existant&amp;nbsp; binary file (no need creation) :&lt;/P&gt;&lt;P&gt;(defun Store64 ( an64BitNumList FileName / )&lt;/P&gt;&lt;P&gt;&amp;nbsp;;an64BitNumList is type List and includes integers&lt;/P&gt;&lt;P&gt;&amp;nbsp;;FileName is the path (type string) in witch the numbers will be stored&lt;/P&gt;&lt;P&gt;&amp;nbsp;........&lt;/P&gt;&lt;P&gt;)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;b) A Restore function that reads those stored values:&lt;/P&gt;&lt;P&gt;(defun Restore64 ( FileName / RET )&lt;/P&gt;&lt;P&gt;&amp;nbsp;;FileName is the path (type string) in witch the numbers are stored&lt;/P&gt;&lt;P&gt;&amp;nbsp;;RET is the retuned int64 stored values&lt;BR /&gt;.......&lt;BR /&gt;RET&lt;/P&gt;&lt;P&gt;)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Gery&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 21 Feb 2025 23:19:53 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/autolisp-code-to-read-write-file-of-32-bit-integer-int32/m-p/13333209#M2832</guid>
      <dc:creator>GeryKnee</dc:creator>
      <dc:date>2025-02-21T23:19:53Z</dc:date>
    </item>
    <item>
      <title>Re: autolisp code to read/write file of 32 bit integer int32</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/autolisp-code-to-read-write-file-of-32-bit-integer-int32/m-p/13333392#M2833</link>
      <description>&lt;P&gt;Did you google write Binary files lisp.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="SeaHaven_0-1740193677964.png" style="width: 600px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1469800i41B38D49E9E9D8F8/image-size/medium?v=v2&amp;amp;px=400" role="button" title="SeaHaven_0-1740193677964.png" alt="SeaHaven_0-1740193677964.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 22 Feb 2025 03:08:07 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/autolisp-code-to-read-write-file-of-32-bit-integer-int32/m-p/13333392#M2833</guid>
      <dc:creator>Sea-Haven</dc:creator>
      <dc:date>2025-02-22T03:08:07Z</dc:date>
    </item>
    <item>
      <title>Re: autolisp code to read/write file of 32 bit integer int32</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/autolisp-code-to-read-write-file-of-32-bit-integer-int32/m-p/13333769#M2834</link>
      <description>&lt;P&gt;I think you have to read as a byte array, then pack the integers&lt;/P&gt;</description>
      <pubDate>Sat, 22 Feb 2025 12:52:31 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/autolisp-code-to-read-write-file-of-32-bit-integer-int32/m-p/13333769#M2834</guid>
      <dc:creator>daniel_cadext</dc:creator>
      <dc:date>2025-02-22T12:52:31Z</dc:date>
    </item>
    <item>
      <title>Re: autolisp code to read/write file of 32 bit integer int32</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/autolisp-code-to-read-write-file-of-32-bit-integer-int32/m-p/13334091#M2835</link>
      <description>&lt;P&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/2354030"&gt;@GeryKnee&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;hey there,&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/2354030"&gt;@GeryKnee&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;&lt;P&gt;...to store them to an existant&amp;nbsp; binary file (no need creation) ...&lt;/P&gt;&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;what is this binary file?&lt;/P&gt;</description>
      <pubDate>Sat, 22 Feb 2025 20:42:59 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/autolisp-code-to-read-write-file-of-32-bit-integer-int32/m-p/13334091#M2835</guid>
      <dc:creator>komondormrex</dc:creator>
      <dc:date>2025-02-22T20:42:59Z</dc:date>
    </item>
    <item>
      <title>Re: autolisp code to read/write file of 32 bit integer int32</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/autolisp-code-to-read-write-file-of-32-bit-integer-int32/m-p/13334125#M2836</link>
      <description>&lt;P&gt;&lt;BR /&gt;;using the WriteBinaryStream ::::&lt;/P&gt;&lt;P&gt;(defun LM:WriteBinaryStream ( filename data&lt;BR /&gt;/&lt;BR /&gt;ADOStream result&lt;BR /&gt;)&lt;BR /&gt;(setq result&lt;BR /&gt;(vl-catch-all-apply&lt;BR /&gt;(function&lt;BR /&gt;(lambda ( )&lt;BR /&gt;(setq ADOStream (vlax-create-object "ADODB.Stream"))&lt;BR /&gt;(vlax-put-property ADOStream 'type 1)&lt;BR /&gt;(vlax-invoke ADOStream 'open)&lt;BR /&gt;(vlax-invoke-method ADOStream 'write data)&lt;BR /&gt;(vlax-invoke ADOStream 'savetofile filename 2)&lt;BR /&gt;)&lt;BR /&gt;)&lt;BR /&gt;)&lt;BR /&gt;)&lt;BR /&gt;(if ADOStream (vlax-release-object ADOStream))&lt;BR /&gt;(if (not (vl-catch-all-error-p result))&lt;BR /&gt;file&lt;BR /&gt;)&lt;BR /&gt;)&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;(defun c:test ( /&lt;BR /&gt;filename&lt;BR /&gt;aDataVar&lt;BR /&gt;)&lt;BR /&gt;(setq filename "C:/test.bin")&lt;BR /&gt;(princ (vl-file-size filename))&lt;BR /&gt;(princ)&lt;BR /&gt;(setq aDataVar 123456789 )&lt;BR /&gt;(LM:WriteBinaryStream&lt;BR /&gt;aDataVar&lt;BR /&gt;filename&lt;BR /&gt;)&lt;BR /&gt;(princ "\nSTORED TO DISK ")&lt;BR /&gt;(princ "\n")&lt;BR /&gt;(princ (vl-file-size filename))&lt;BR /&gt;(princ)&lt;BR /&gt;)&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;;;; after TEST called test.bin filesize 0 (data not writed)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 22 Feb 2025 21:47:28 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/autolisp-code-to-read-write-file-of-32-bit-integer-int32/m-p/13334125#M2836</guid>
      <dc:creator>GeryKnee</dc:creator>
      <dc:date>2025-02-22T21:47:28Z</dc:date>
    </item>
    <item>
      <title>Re: autolisp code to read/write file of 32 bit integer int32</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/autolisp-code-to-read-write-file-of-32-bit-integer-int32/m-p/13334132#M2837</link>
      <description>&lt;P&gt;Maybe&lt;/P&gt;
&lt;P&gt;(vlax-invoke ADOstream 'Close)&lt;/P&gt;
&lt;P&gt;?&lt;/P&gt;
&lt;P&gt;And you will probably need to encode the bytestream for int64.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Vladimir Michl, &lt;A href="http://www.arkance.world" target="_blank"&gt;www.arkance.world&lt;/A&gt;&amp;nbsp; -&amp;nbsp; &lt;A href="http://www.cadforum.cz" target="_blank"&gt;www.cadforum.cz&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 22 Feb 2025 21:54:09 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/autolisp-code-to-read-write-file-of-32-bit-integer-int32/m-p/13334132#M2837</guid>
      <dc:creator>vladimir_michl</dc:creator>
      <dc:date>2025-02-22T21:54:09Z</dc:date>
    </item>
  </channel>
</rss>

