<?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: setFromOldId cannot access private member declared in class 'AcDbObjectId' in ObjectARX Forum</title>
    <link>https://forums.autodesk.com/t5/objectarx-forum/setfromoldid-cannot-access-private-member-declared-in-class/m-p/8021246#M12730</link>
    <description>Looking at the AcDbObjectId class declaration in dbid.h, I see that you can use this version of setFromOldId:&lt;BR /&gt;&lt;BR /&gt;    AcDbObjectId&amp;amp;  setFromOldId(Adesk::IntDbId oldId);&lt;BR /&gt;&lt;BR /&gt;for both 32-bit and 64-bit. so, you'd be using an Adesk::IntDbId instead of a long.  Adesk::IntDbId is an Int32 on 32-bit and an Int64 on 64-bit (see the adesk.h header file for the typedefs).&lt;BR /&gt;&lt;BR /&gt;Or, for 64-bit only you can use this one:&lt;BR /&gt;&lt;BR /&gt;    inline AcDbObjectId&amp;amp;  setFromOldId(Adesk::UIntPtr nUnsignedId)&lt;BR /&gt;&lt;BR /&gt;which is just an inline that calls the Adesk::IntDbId version.</description>
    <pubDate>Wed, 23 May 2018 15:37:04 GMT</pubDate>
    <dc:creator>artc2</dc:creator>
    <dc:date>2018-05-23T15:37:04Z</dc:date>
    <item>
      <title>setFromOldId cannot access private member declared in class 'AcDbObjectId'</title>
      <link>https://forums.autodesk.com/t5/objectarx-forum/setfromoldid-cannot-access-private-member-declared-in-class/m-p/4786333#M12726</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have a function as below, which is working fine when using with RealDWG 2010 32-bit reference.&lt;BR /&gt;Now i am migrating my project from RealDWG2010 to 2013 64-bit version, so i migrated from vs2008 to vs2010.&lt;BR /&gt;But when i am trying to build the solution, i am getting the following error in Line 6.&lt;BR /&gt;Can any one help me in solving this issue.&lt;BR /&gt;&lt;BR /&gt;*********************************Error received**********************************&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;error C2248: 'AcDbObjectId::setFromOldId' : cannot access private member declared in class 'AcDbObjectId'&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;*********************************************************************************&lt;BR /&gt;&lt;BR /&gt;**********************************Code&amp;nbsp; used************************************&lt;BR /&gt;&lt;BR /&gt;int DWGMgr::GetInsertionPoint(long nObjectID, CNSPoint3D &amp;amp;pt)&lt;BR /&gt;{&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;Acad::ErrorStatus es;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;AcDbObject *pEntity;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;AcDbObjectId pBlockObjID;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;FONT color="#FF0000"&gt;pBlockObjID.setFromOldId(nObjectID);&lt;/FONT&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;es = acdbOpenObject(pEntity, pBlockObjID, AcDb::kForRead);&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;if(es != Acad::eOk)&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;return NS_FAIL;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;if(!pEntity-&amp;gt;isKindOf(AcDbBlockReference::desc()))&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;{&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;pEntity-&amp;gt;close();&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;return NS_FAIL;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;}&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;AcDbBlockReference *pRef = (AcDbBlockReference*)pEntity;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;AcGePoint3d p3dPosition&amp;nbsp;&amp;nbsp; = pRef-&amp;gt;position();&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;pt.m_dXX = p3dPosition.x;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;pt.m_dYY = p3dPosition.y;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;pt.m_dZZ = p3dPosition.z;&lt;BR /&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;pRef-&amp;gt;close();&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;pEntity-&amp;gt;close();&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;return NS_SUCCESS;&lt;BR /&gt;}&lt;BR /&gt;&lt;BR /&gt;**********************************************************************************&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks in Advance.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Chockalingam.&lt;/P&gt;</description>
      <pubDate>Fri, 31 Jan 2014 07:26:49 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/objectarx-forum/setfromoldid-cannot-access-private-member-declared-in-class/m-p/4786333#M12726</guid>
      <dc:creator>chockalingam</dc:creator>
      <dc:date>2014-01-31T07:26:49Z</dc:date>
    </item>
    <item>
      <title>Re: setFromOldId cannot access private member declared in class 'AcDbObjectId'</title>
      <link>https://forums.autodesk.com/t5/objectarx-forum/setfromoldid-cannot-access-private-member-declared-in-class/m-p/4786757#M12727</link>
      <description>&lt;P&gt;A long is not large enough to hold an AcDbObjectID on a 64-bit system. You'll&amp;nbsp;need to change your code&amp;nbsp;to use something&amp;nbsp;that&amp;nbsp;is large enough&amp;nbsp;to hold a 64-bit pointer.&lt;/P&gt;</description>
      <pubDate>Fri, 31 Jan 2014 12:52:30 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/objectarx-forum/setfromoldid-cannot-access-private-member-declared-in-class/m-p/4786757#M12727</guid>
      <dc:creator>owenwengerd</dc:creator>
      <dc:date>2014-01-31T12:52:30Z</dc:date>
    </item>
    <item>
      <title>Re: setFromOldId cannot access private member declared in class 'AcDbObjectId'</title>
      <link>https://forums.autodesk.com/t5/objectarx-forum/setfromoldid-cannot-access-private-member-declared-in-class/m-p/8020281#M12729</link>
      <description>Hi, Owen Wengerd&lt;BR /&gt;&lt;BR /&gt;I am facing the same error when migrating 32bit source to 64bit.&lt;BR /&gt;If long is not enough to hold AcDbObjectID, then what should be used instead? Can you specify it in detail? An example would be great.&lt;BR /&gt;According to the error message, it seems more like a access permission issue to me? Because passing a parameter of long type would result in same error. ObjectARX SDK explicitly set the access permission to private for 64 bit environment. I don't know why, but what do you think?&lt;BR /&gt;Sorry for asking a lot and thanks in advanced.&lt;BR /&gt;I am new to C++, AutoCad &amp;amp; ObjectARX.&lt;BR /&gt;Thank you.</description>
      <pubDate>Wed, 23 May 2018 09:10:35 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/objectarx-forum/setfromoldid-cannot-access-private-member-declared-in-class/m-p/8020281#M12729</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-05-23T09:10:35Z</dc:date>
    </item>
    <item>
      <title>Re: setFromOldId cannot access private member declared in class 'AcDbObjectId'</title>
      <link>https://forums.autodesk.com/t5/objectarx-forum/setfromoldid-cannot-access-private-member-declared-in-class/m-p/8021246#M12730</link>
      <description>Looking at the AcDbObjectId class declaration in dbid.h, I see that you can use this version of setFromOldId:&lt;BR /&gt;&lt;BR /&gt;    AcDbObjectId&amp;amp;  setFromOldId(Adesk::IntDbId oldId);&lt;BR /&gt;&lt;BR /&gt;for both 32-bit and 64-bit. so, you'd be using an Adesk::IntDbId instead of a long.  Adesk::IntDbId is an Int32 on 32-bit and an Int64 on 64-bit (see the adesk.h header file for the typedefs).&lt;BR /&gt;&lt;BR /&gt;Or, for 64-bit only you can use this one:&lt;BR /&gt;&lt;BR /&gt;    inline AcDbObjectId&amp;amp;  setFromOldId(Adesk::UIntPtr nUnsignedId)&lt;BR /&gt;&lt;BR /&gt;which is just an inline that calls the Adesk::IntDbId version.</description>
      <pubDate>Wed, 23 May 2018 15:37:04 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/objectarx-forum/setfromoldid-cannot-access-private-member-declared-in-class/m-p/8021246#M12730</guid>
      <dc:creator>artc2</dc:creator>
      <dc:date>2018-05-23T15:37:04Z</dc:date>
    </item>
  </channel>
</rss>

