<?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: nested X-Ref in ObjectARX Forum</title>
    <link>https://forums.autodesk.com/t5/objectarx-forum/nested-x-ref/m-p/1144720#M28729</link>
    <description>thanks Byron for your reply!&lt;BR /&gt;
&lt;BR /&gt;
i am using ACAD2002.&lt;BR /&gt;
&lt;BR /&gt;
can you please suggest some other method to do it with ACAD2002.&lt;BR /&gt;
&lt;BR /&gt;
Thanks&lt;BR /&gt;
&lt;BR /&gt;
Santosh</description>
    <pubDate>Wed, 29 Sep 2004 06:15:23 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2004-09-29T06:15:23Z</dc:date>
    <item>
      <title>nested X-Ref</title>
      <link>https://forums.autodesk.com/t5/objectarx-forum/nested-x-ref/m-p/1144718#M28727</link>
      <description>hi,&lt;BR /&gt;
&lt;BR /&gt;
I ahve to traverse nested x ref drawing databases without opening x-ref drawings.&lt;BR /&gt;
&lt;BR /&gt;
i am using following code to do so&lt;BR /&gt;
&lt;BR /&gt;
AcDbDatabase *pCurDwg = new AcDbDatabase(Adesk::kFalse,Adesk::kTrue);&lt;BR /&gt;
&lt;BR /&gt;
es = pCurDwg-&amp;gt;readDwgFile(av_DwgName,_SH_DENYNO);&lt;BR /&gt;
if(es == Acad::eOk)&lt;BR /&gt;
{&lt;BR /&gt;
       AcDbBlockTablePointer bt(pCurDwg, AcDb::kForRead);&lt;BR /&gt;
       AcDbBlockTableIterator *it;&lt;BR /&gt;
      es =bt-&amp;gt;newIterator(it);&lt;BR /&gt;
      if ( es== Acad::eOk )&lt;BR /&gt;
      {&lt;BR /&gt;
             for ( ; !it-&amp;gt;done(); it-&amp;gt;step() )&lt;BR /&gt;
            {				AcDbObjectId btrId;&lt;BR /&gt;
	it-&amp;gt;getRecordId(btrId);&lt;BR /&gt;
				AcDbBlockTableRecordPointer btr(btrId, AcDb::kForRead);&lt;BR /&gt;
                    &lt;BR /&gt;
                     bool data=false;&lt;BR /&gt;
	data=btr-&amp;gt;isFromExternalReference();&lt;BR /&gt;
&lt;BR /&gt;
	if ( data==true )&lt;BR /&gt;
	{			               pCurDwg = btr-&amp;gt;xrefDatabase();&lt;BR /&gt;
					//Check for valid pointer			//				if(NULL != pCurDwg)			{&lt;BR /&gt;
                             //here i am not getting the x-ref drawing pointer i am getting NULL.&lt;BR /&gt;
&lt;BR /&gt;
the method isFromExternalReference() returns TRUE but i am not getting pointer to that database.&lt;BR /&gt;
&lt;BR /&gt;
can any one help me to solve this &lt;BR /&gt;
&lt;BR /&gt;
thanks in advance.&lt;BR /&gt;
&lt;BR /&gt;
santosh</description>
      <pubDate>Tue, 28 Sep 2004 10:35:28 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/objectarx-forum/nested-x-ref/m-p/1144718#M28727</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2004-09-28T10:35:28Z</dc:date>
    </item>
    <item>
      <title>Re: nested X-Ref</title>
      <link>https://forums.autodesk.com/t5/objectarx-forum/nested-x-ref/m-p/1144719#M28728</link>
      <description>santosh wrote:

&amp;gt; hi,
&amp;gt; 
&amp;gt; I ahve to traverse nested x ref drawing databases without opening x-ref drawings.
&amp;gt; 
&amp;gt; i am using following code to do so
&amp;gt; 
&amp;gt; AcDbDatabase *pCurDwg = new AcDbDatabase(Adesk::kFalse,Adesk::kTrue);
&amp;gt; 
&amp;gt; es = pCurDwg-&amp;gt;readDwgFile(av_DwgName,_SH_DENYNO);
&amp;gt; if(es == Acad::eOk)
&amp;gt; {
&amp;gt;        AcDbBlockTablePointer bt(pCurDwg, AcDb::kForRead);
&amp;gt;        AcDbBlockTableIterator *it;
&amp;gt;       es =bt-&amp;gt;newIterator(it);
&amp;gt;       if ( es== Acad::eOk )
&amp;gt;       {
&amp;gt;              for ( ; !it-&amp;gt;done(); it-&amp;gt;step() )
&amp;gt;             {				AcDbObjectId btrId;
&amp;gt; 	it-&amp;gt;getRecordId(btrId);
&amp;gt; 				AcDbBlockTableRecordPointer btr(btrId, AcDb::kForRead);
&amp;gt;                     
&amp;gt;                      bool data=false;
&amp;gt; 	data=btr-&amp;gt;isFromExternalReference();
&amp;gt; 
&amp;gt; 	if ( data==true )
&amp;gt; 	{			               pCurDwg = btr-&amp;gt;xrefDatabase();
&amp;gt; 					//Check for valid pointer			//				if(NULL != pCurDwg)			{
&amp;gt;                              //here i am not getting the x-ref drawing pointer i am getting NULL.
&amp;gt; 
&amp;gt; the method isFromExternalReference() returns TRUE but i am not getting pointer to that database.
&amp;gt; 
&amp;gt; can any one help me to solve this 
&amp;gt; 
&amp;gt; thanks in advance.
&amp;gt; 
&amp;gt; santosh

The news is not good unless you are running 2005.  The following 
function will force the loading of the xref's-

Acad::ErrorStatus acdbResolveCurrentXRefs(AcDbDatabase* pDB, bool, bool)

-- 
Best regards,

   Byron Blattel
   CADwerx--Applications for AutoCAD
   Autodesk Registered Developer
   Contact Info @ http://www.cadwerx.net
   Custom Programming Services - ObjectARX/C++/MFC/ASP/STL/ATL/ISAPI...</description>
      <pubDate>Tue, 28 Sep 2004 14:39:06 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/objectarx-forum/nested-x-ref/m-p/1144719#M28728</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2004-09-28T14:39:06Z</dc:date>
    </item>
    <item>
      <title>Re: nested X-Ref</title>
      <link>https://forums.autodesk.com/t5/objectarx-forum/nested-x-ref/m-p/1144720#M28729</link>
      <description>thanks Byron for your reply!&lt;BR /&gt;
&lt;BR /&gt;
i am using ACAD2002.&lt;BR /&gt;
&lt;BR /&gt;
can you please suggest some other method to do it with ACAD2002.&lt;BR /&gt;
&lt;BR /&gt;
Thanks&lt;BR /&gt;
&lt;BR /&gt;
Santosh</description>
      <pubDate>Wed, 29 Sep 2004 06:15:23 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/objectarx-forum/nested-x-ref/m-p/1144720#M28729</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2004-09-29T06:15:23Z</dc:date>
    </item>
  </channel>
</rss>

