<?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 rollback the read() operation of a filer? in ObjectARX Forum</title>
    <link>https://forums.autodesk.com/t5/objectarx-forum/rollback-the-read-operation-of-a-filer/m-p/1234490#M27562</link>
    <description>Hi,&lt;BR /&gt;
&lt;BR /&gt;
I read an object in dwgInFields(), but&lt;BR /&gt;
there are 2 versions out there:&lt;BR /&gt;
&lt;BR /&gt;
1:&lt;BR /&gt;
int&lt;BR /&gt;
int&lt;BR /&gt;
&lt;BR /&gt;
2:&lt;BR /&gt;
int&lt;BR /&gt;
int&lt;BR /&gt;
string&lt;BR /&gt;
int&lt;BR /&gt;
&lt;BR /&gt;
How can I read both correctly? The first 2 fields (int) are identical in both objects. &lt;BR /&gt;
What I can do (can I?): read first 2 int's, then read string,and if it's a "real string continue reading; otherwise "rollback" the read operation.&lt;BR /&gt;
&lt;BR /&gt;
But is there any way to "rollback" the read operation?</description>
    <pubDate>Thu, 27 Jan 2005 12:51:38 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2005-01-27T12:51:38Z</dc:date>
    <item>
      <title>rollback the read() operation of a filer?</title>
      <link>https://forums.autodesk.com/t5/objectarx-forum/rollback-the-read-operation-of-a-filer/m-p/1234490#M27562</link>
      <description>Hi,&lt;BR /&gt;
&lt;BR /&gt;
I read an object in dwgInFields(), but&lt;BR /&gt;
there are 2 versions out there:&lt;BR /&gt;
&lt;BR /&gt;
1:&lt;BR /&gt;
int&lt;BR /&gt;
int&lt;BR /&gt;
&lt;BR /&gt;
2:&lt;BR /&gt;
int&lt;BR /&gt;
int&lt;BR /&gt;
string&lt;BR /&gt;
int&lt;BR /&gt;
&lt;BR /&gt;
How can I read both correctly? The first 2 fields (int) are identical in both objects. &lt;BR /&gt;
What I can do (can I?): read first 2 int's, then read string,and if it's a "real string continue reading; otherwise "rollback" the read operation.&lt;BR /&gt;
&lt;BR /&gt;
But is there any way to "rollback" the read operation?</description>
      <pubDate>Thu, 27 Jan 2005 12:51:38 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/objectarx-forum/rollback-the-read-operation-of-a-filer/m-p/1234490#M27562</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2005-01-27T12:51:38Z</dc:date>
    </item>
    <item>
      <title>Re: rollback the read() operation of a filer?</title>
      <link>https://forums.autodesk.com/t5/objectarx-forum/rollback-the-read-operation-of-a-filer/m-p/1234491#M27563</link>
      <description>&amp;gt; How can I read both correctly?

  You need to read the appropriate fields depending on the version number.
:)
-- 
Owen Wengerd
President, ManuSoft ==&amp;gt; http://www.manusoft.com
VP Americas, CADLock, Inc. ==&amp;gt; http://www.cadlock.com</description>
      <pubDate>Thu, 27 Jan 2005 13:09:28 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/objectarx-forum/rollback-the-read-operation-of-a-filer/m-p/1234491#M27563</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2005-01-27T13:09:28Z</dc:date>
    </item>
    <item>
      <title>Re: rollback the read() operation of a filer?</title>
      <link>https://forums.autodesk.com/t5/objectarx-forum/rollback-the-read-operation-of-a-filer/m-p/1234492#M27564</link>
      <description>Hi,

I can only agree with Owen, your object should have from start had a version
number as the first item which tells your code how to read the object. If
you haven't implemented a version number then you are in trouble as you're
seen.
Since dwgfilers do not support seek() method, nor rollback, you do not have
any solution good solution. Is your second version currently under
development ? Is your first version of your object limited to r14, and the
new object version for 2000 file format ? In those case there are
workarounds, otherwise you will need to doing a live object type conversion
as shown in the ADN Devnote #26695 to introduce a version number live.

Natural sequences should be:

1:
int version number = 1
int
int

2:
int version number = 2
int
int
string
int

So your code can switch from 1 case to the other, and is ready for future.

Cheers
cyrille</description>
      <pubDate>Thu, 27 Jan 2005 13:25:17 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/objectarx-forum/rollback-the-read-operation-of-a-filer/m-p/1234492#M27564</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2005-01-27T13:25:17Z</dc:date>
    </item>
    <item>
      <title>Re: rollback the read() operation of a filer?</title>
      <link>https://forums.autodesk.com/t5/objectarx-forum/rollback-the-read-operation-of-a-filer/m-p/1234493#M27565</link>
      <description>Well, I know that &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt; That's what I normally do :))&lt;BR /&gt;
But the code was already there. And I have to deal with 2 versions of object. some users used 1 version, another -the other. &lt;span class="lia-unicode-emoji" title=":disappointed_face:"&gt;😞&lt;/span&gt;&lt;BR /&gt;
&lt;BR /&gt;
There is no "version" field, as you can see from the description. First 2 ints are sizes of the object.

&lt;BR /&gt;
Message was edited by: andru123</description>
      <pubDate>Thu, 27 Jan 2005 13:25:52 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/objectarx-forum/rollback-the-read-operation-of-a-filer/m-p/1234493#M27565</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2005-01-27T13:25:52Z</dc:date>
    </item>
  </channel>
</rss>

