<?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 bind xref and explode in .NET Forum</title>
    <link>https://forums.autodesk.com/t5/net-forum/bind-xref-and-explode/m-p/3873677#M49968</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp;I am trying to Bind Xref and Explode them.&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp;When i tried to Bind Xref i get an error as "eInvaid Key"&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The following is the code that i am using&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Document&amp;nbsp;&lt;SPAN&gt;doc&amp;nbsp;&lt;/SPAN&gt;= Autodesk.AutoCAD.ApplicationServices.Application.DocumentManager.MdiActiveDocument;&lt;/P&gt;&lt;P&gt;ObjectIdCollection btrCol = new ObjectIdCollection();&lt;BR /&gt;using (tr)&lt;BR /&gt;{&lt;BR /&gt;XrefGraph xrgraph = doc.Database.GetHostDwgXrefGraph(false);&lt;BR /&gt;&lt;SPAN style="font-size: 11px; line-height: 14px;"&gt;for (int i = 1; i &amp;lt; xrgraph.NumNodes; i++)&lt;/SPAN&gt;&lt;BR /&gt;{&lt;BR /&gt;XrefGraphNode xrNode = xrgraph.GetXrefNode(i);&lt;BR /&gt;BlockTableRecord btr = (BlockTableRecord)tr.GetObject(xrNode.BlockTableRecordId, OpenMode.ForRead);&lt;BR /&gt;if (btr.IsFromExternalReference)&lt;BR /&gt;{&lt;BR /&gt;switch (xrNode.XrefStatus)&lt;BR /&gt;{&lt;BR /&gt;&lt;SPAN style="font-size: 11px; line-height: 14px;"&gt;case Autodesk.AutoCAD.DatabaseServices.XrefStatus.Resolved:&lt;/SPAN&gt;&lt;BR /&gt;btrCol.Add(btr.ObjectId); break;&lt;BR /&gt;&lt;SPAN style="font-size: 11px; line-height: 14px;"&gt;}&lt;/SPAN&gt;&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;SPAN&gt;doc&lt;/SPAN&gt;.Database.BindXrefs(XrefIds, true);&lt;/P&gt;</description>
    <pubDate>Wed, 17 Apr 2013 06:39:14 GMT</pubDate>
    <dc:creator>chockalingam</dc:creator>
    <dc:date>2013-04-17T06:39:14Z</dc:date>
    <item>
      <title>bind xref and explode</title>
      <link>https://forums.autodesk.com/t5/net-forum/bind-xref-and-explode/m-p/3873677#M49968</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp;I am trying to Bind Xref and Explode them.&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp;When i tried to Bind Xref i get an error as "eInvaid Key"&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The following is the code that i am using&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Document&amp;nbsp;&lt;SPAN&gt;doc&amp;nbsp;&lt;/SPAN&gt;= Autodesk.AutoCAD.ApplicationServices.Application.DocumentManager.MdiActiveDocument;&lt;/P&gt;&lt;P&gt;ObjectIdCollection btrCol = new ObjectIdCollection();&lt;BR /&gt;using (tr)&lt;BR /&gt;{&lt;BR /&gt;XrefGraph xrgraph = doc.Database.GetHostDwgXrefGraph(false);&lt;BR /&gt;&lt;SPAN style="font-size: 11px; line-height: 14px;"&gt;for (int i = 1; i &amp;lt; xrgraph.NumNodes; i++)&lt;/SPAN&gt;&lt;BR /&gt;{&lt;BR /&gt;XrefGraphNode xrNode = xrgraph.GetXrefNode(i);&lt;BR /&gt;BlockTableRecord btr = (BlockTableRecord)tr.GetObject(xrNode.BlockTableRecordId, OpenMode.ForRead);&lt;BR /&gt;if (btr.IsFromExternalReference)&lt;BR /&gt;{&lt;BR /&gt;switch (xrNode.XrefStatus)&lt;BR /&gt;{&lt;BR /&gt;&lt;SPAN style="font-size: 11px; line-height: 14px;"&gt;case Autodesk.AutoCAD.DatabaseServices.XrefStatus.Resolved:&lt;/SPAN&gt;&lt;BR /&gt;btrCol.Add(btr.ObjectId); break;&lt;BR /&gt;&lt;SPAN style="font-size: 11px; line-height: 14px;"&gt;}&lt;/SPAN&gt;&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;SPAN&gt;doc&lt;/SPAN&gt;.Database.BindXrefs(XrefIds, true);&lt;/P&gt;</description>
      <pubDate>Wed, 17 Apr 2013 06:39:14 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/bind-xref-and-explode/m-p/3873677#M49968</guid>
      <dc:creator>chockalingam</dc:creator>
      <dc:date>2013-04-17T06:39:14Z</dc:date>
    </item>
  </channel>
</rss>

