<?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: get entity inside an xref given a point in .NET Forum</title>
    <link>https://forums.autodesk.com/t5/net-forum/get-entity-inside-an-xref-given-a-point/m-p/2829851#M66004</link>
    <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;What is the owner of the entity ?? ... may help decide&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;ie is the container BlockTable ModelSpace, Paperspace or a block&lt;/FONT&gt;&lt;/P&gt;</description>
    <pubDate>Thu, 18 Nov 2010 08:55:24 GMT</pubDate>
    <dc:creator>kerry_w_brown</dc:creator>
    <dc:date>2010-11-18T08:55:24Z</dc:date>
    <item>
      <title>get entity inside an xref given a point</title>
      <link>https://forums.autodesk.com/t5/net-forum/get-entity-inside-an-xref-given-a-point/m-p/2662731#M65997</link>
      <description>hi. is there any way to get the entity inside an xref given a point? im using vb.net thanks...

Edited by: a7v1n on Apr 8, 2010 6:16 AM</description>
      <pubDate>Thu, 08 Apr 2010 06:11:35 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/get-entity-inside-an-xref-given-a-point/m-p/2662731#M65997</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2010-04-08T06:11:35Z</dc:date>
    </item>
    <item>
      <title>Re: get entity inside an xref given a point</title>
      <link>https://forums.autodesk.com/t5/net-forum/get-entity-inside-an-xref-given-a-point/m-p/2662732#M65998</link>
      <description>Hi,&lt;BR /&gt;
&lt;BR /&gt;
Look at the NonInteractivePickPoint and UseNonInteractivePickPoint properties of the PromptNestedEntityOptions class.</description>
      <pubDate>Thu, 08 Apr 2010 09:19:52 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/get-entity-inside-an-xref-given-a-point/m-p/2662732#M65998</guid>
      <dc:creator>_gile</dc:creator>
      <dc:date>2010-04-08T09:19:52Z</dc:date>
    </item>
    <item>
      <title>Re: get entity inside an xref given a point</title>
      <link>https://forums.autodesk.com/t5/net-forum/get-entity-inside-an-xref-given-a-point/m-p/2662733#M65999</link>
      <description>could you post some code pls? Thanks...</description>
      <pubDate>Thu, 08 Apr 2010 16:13:59 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/get-entity-inside-an-xref-given-a-point/m-p/2662733#M65999</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2010-04-08T16:13:59Z</dc:date>
    </item>
    <item>
      <title>Re: get entity inside an xref given a point</title>
      <link>https://forums.autodesk.com/t5/net-forum/get-entity-inside-an-xref-given-a-point/m-p/2662734#M66000</link>
      <description>Here's a C# sample&lt;BR /&gt;
&lt;BR /&gt;
{code}private ObjectId GetNestedEntityByPoint(Point3d pt)&lt;BR /&gt;
{&lt;BR /&gt;
    Editor ed = Application.DocumentManager.MdiActiveDocument.Editor;&lt;BR /&gt;
    PromptNestedEntityOptions pneo = new PromptNestedEntityOptions("");&lt;BR /&gt;
    pneo.NonInteractivePickPoint = pt;&lt;BR /&gt;
    pneo.UseNonInteractivePickPoint = true;&lt;BR /&gt;
    PromptNestedEntityResult pner = ed.GetNestedEntity(pneo);&lt;BR /&gt;
    return pner.ObjectId;&lt;BR /&gt;
}{code}</description>
      <pubDate>Thu, 08 Apr 2010 17:33:59 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/get-entity-inside-an-xref-given-a-point/m-p/2662734#M66000</guid>
      <dc:creator>_gile</dc:creator>
      <dc:date>2010-04-08T17:33:59Z</dc:date>
    </item>
    <item>
      <title>Re: get entity inside an xref given a point</title>
      <link>https://forums.autodesk.com/t5/net-forum/get-entity-inside-an-xref-given-a-point/m-p/2829331#M66001</link>
      <description>&lt;P&gt;Help needed - Using the above code, when a point is selected in the black area on the drawing which means nothing is selected, the autocad keeps running infinitely in a loop like thing.&lt;/P&gt;&lt;P&gt;Is there a way to check when there is no selection made for a nested entity. Like when&amp;nbsp; nothing is selected do something.&lt;/P&gt;&lt;P&gt;I am using vb.net&lt;/P&gt;</description>
      <pubDate>Wed, 17 Nov 2010 19:46:00 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/get-entity-inside-an-xref-given-a-point/m-p/2829331#M66001</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2010-11-17T19:46:00Z</dc:date>
    </item>
    <item>
      <title>Re: get entity inside an xref given a point</title>
      <link>https://forums.autodesk.com/t5/net-forum/get-entity-inside-an-xref-given-a-point/m-p/2829721#M66002</link>
      <description>&lt;P&gt;I have or seen something similar. When I get more time I will try to find it&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;For now this goes in the oppisite direction but might help.&lt;/P&gt;&lt;P&gt;The basic idea is when you are in paperspace and notice the xref is missing something or you want to add something. Instead of opening the xref or switching to model or editing in place the xref. You can just draw on top of the viewport then send it to the xref just as it appears.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here is the link and alot of other great info and users &lt;A href="http://www.theswamp.org/index.php?topic=34590.0" target="_blank" rel="nofollow"&gt;http://www.theswamp.org/index.php?topic=34590.0&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 18 Nov 2010 01:14:31 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/get-entity-inside-an-xref-given-a-point/m-p/2829721#M66002</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2010-11-18T01:14:31Z</dc:date>
    </item>
    <item>
      <title>Re: get entity inside an xref given a point</title>
      <link>https://forums.autodesk.com/t5/net-forum/get-entity-inside-an-xref-given-a-point/m-p/2829725#M66003</link>
      <description>&lt;P&gt;thanks for the reply..&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;But I want to check if the selected point is on a nested entity not an entity.&lt;/P&gt;&lt;P&gt;For entity we can do addallowedclass(viewport) but how can we do something similar to that for a nested entity.?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;i have the code i am using to get nested entity at selected point.&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" size="2"&gt;&lt;FONT color="#0000ff" size="2"&gt;Dim&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size="2"&gt; pneo &lt;/FONT&gt;&lt;FONT color="#0000ff" size="2"&gt;&lt;FONT color="#0000ff" size="2"&gt;As&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size="2"&gt; PromptNestedEntityOptions&lt;/FONT&gt;&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;&lt;P&gt;&lt;FONT color="#0000ff" size="2"&gt;&lt;FONT color="#0000ff" size="2"&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;pneo =New&lt;FONT size="2"&gt;PromptNestedEntityOptions(&lt;FONT color="#a31515"&gt;&lt;FONT color="#a31515"&gt;""&lt;/FONT&gt;&lt;/FONT&gt;)&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;pneo.NonInteractivePickPoint = selectedpoint&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;&lt;/FONT&gt;&lt;FONT size="2"&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;pneo.UseNonInteractivePickPoint =&lt;FONT color="#0000ff"&gt;True&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" size="2"&gt;&lt;FONT color="#0000ff" size="2"&gt;Dim&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size="2"&gt; psubent &lt;/FONT&gt;&lt;FONT color="#0000ff" size="2"&gt;&lt;FONT color="#0000ff" size="2"&gt;As&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size="2"&gt; Entity = acTrans.GetObject(acDoc.Editor.GetNestedEntity(pneo).ObjectId, OpenMode.ForRead)&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;it hangs up in the above line where i am getting the objectid.&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;anything i am doing wrong?&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff"&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="1"&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 18 Nov 2010 01:26:32 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/get-entity-inside-an-xref-given-a-point/m-p/2829725#M66003</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2010-11-18T01:26:32Z</dc:date>
    </item>
    <item>
      <title>Re: get entity inside an xref given a point</title>
      <link>https://forums.autodesk.com/t5/net-forum/get-entity-inside-an-xref-given-a-point/m-p/2829851#M66004</link>
      <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;What is the owner of the entity ?? ... may help decide&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;ie is the container BlockTable ModelSpace, Paperspace or a block&lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 18 Nov 2010 08:55:24 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/get-entity-inside-an-xref-given-a-point/m-p/2829851#M66004</guid>
      <dc:creator>kerry_w_brown</dc:creator>
      <dc:date>2010-11-18T08:55:24Z</dc:date>
    </item>
    <item>
      <title>Re: get entity inside an xref given a point</title>
      <link>https://forums.autodesk.com/t5/net-forum/get-entity-inside-an-xref-given-a-point/m-p/2830337#M66005</link>
      <description>&lt;P&gt;Thanks for the reply..&lt;/P&gt;&lt;P&gt;I am unable to get the owner ID of the nested entity. Since, it hangs up at getting the object ID itself, it does not go till the point I am able to get the nested entity.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Please, find my whole code is as below:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" size="2"&gt;&lt;FONT color="#0000ff" size="2"&gt;Dim&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size="2"&gt; acDoc &lt;/FONT&gt;&lt;FONT color="#0000ff" size="2"&gt;&lt;FONT color="#0000ff" size="2"&gt;As&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size="2"&gt; Document = Application.DocumentManager.MdiActiveDocument&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;FONT color="#0000ff" size="2"&gt;&lt;FONT color="#0000ff" size="2"&gt;Dim&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size="2"&gt; acCurDb &lt;/FONT&gt;&lt;FONT color="#0000ff" size="2"&gt;&lt;FONT color="#0000ff" size="2"&gt;As&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size="2"&gt; Database = acDoc.Database&lt;/FONT&gt;&lt;FONT size="2"&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" size="2"&gt;&lt;FONT color="#0000ff" size="2"&gt;While&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size="2"&gt; (&lt;/FONT&gt;&lt;FONT color="#0000ff" size="2"&gt;&lt;FONT color="#0000ff" size="2"&gt;True&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size="2"&gt;)&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" size="2"&gt;&lt;FONT color="#0000ff" size="2"&gt;Using&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size="2"&gt; acTrans &lt;/FONT&gt;&lt;FONT color="#0000ff" size="2"&gt;&lt;FONT color="#0000ff" size="2"&gt;As&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size="2"&gt; Transaction = acCurDb.TransactionManager.StartTransaction()&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#008000" size="2"&gt;&lt;FONT color="#008000" size="2"&gt;' Open the Block table record for read&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size="2"&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&lt;FONT color="#0000ff"&gt;Dim&lt;/FONT&gt;&lt;FONT size="2"&gt; acBlkTbl &lt;/FONT&gt;&lt;FONT color="#0000ff" size="2"&gt;&lt;FONT color="#0000ff" size="2"&gt;As&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size="2"&gt; BlockTable&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;acBlkTbl = acTrans.GetObject(acCurDb.BlockTableId, OpenMode.ForRead)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;FONT color="#008000" size="2"&gt;&lt;FONT color="#008000" size="2"&gt;'' Open the Block table record Model space for write&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size="2"&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&lt;FONT color="#0000ff"&gt;Dim&lt;/FONT&gt;&lt;FONT size="2"&gt; acBlkTblRec &lt;/FONT&gt;&lt;FONT color="#0000ff" size="2"&gt;&lt;FONT color="#0000ff" size="2"&gt;As&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size="2"&gt; BlockTableRecord&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;acBlkTblRec = acTrans.GetObject(acBlkTbl(BlockTableRecord.ModelSpace), OpenMode.ForWrite)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;Application.SetSystemVariable(&lt;FONT color="#a31515"&gt;"OSMODE"&lt;/FONT&gt;&lt;FONT size="2"&gt;, 512)&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;FONT color="#0000ff" size="2"&gt;&lt;FONT color="#0000ff" size="2"&gt;Dim&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size="2"&gt; acnsprompt &lt;/FONT&gt;&lt;FONT color="#0000ff" size="2"&gt;&lt;FONT color="#0000ff" size="2"&gt;As&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size="2"&gt; PromptPointResult = acDoc.Editor.GetPoint(vbCrLf &amp;amp; &lt;/FONT&gt;&lt;FONT color="#a31515" size="2"&gt;&lt;FONT color="#a31515" size="2"&gt;"Select APN or &amp;lt;exit&amp;gt;: "&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size="2"&gt;)&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" size="2"&gt;&lt;FONT color="#0000ff" size="2"&gt;If&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size="2"&gt; acnsprompt.Status = PromptStatus.OK &lt;/FONT&gt;&lt;FONT color="#0000ff" size="2"&gt;&lt;FONT color="#0000ff" size="2"&gt;And&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size="2"&gt; &lt;/FONT&gt;&lt;FONT color="#0000ff" size="2"&gt;&lt;FONT color="#0000ff" size="2"&gt;Not&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size="2"&gt; IsNothing(acnsprompt.Value) &lt;/FONT&gt;&lt;FONT color="#0000ff" size="2"&gt;&lt;FONT color="#0000ff" size="2"&gt;Then&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size="2"&gt; &lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&lt;FONT color="#0000ff"&gt;Dim&lt;/FONT&gt;&lt;FONT size="2"&gt; pneo &lt;/FONT&gt;&lt;FONT color="#0000ff" size="2"&gt;&lt;FONT color="#0000ff" size="2"&gt;As&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size="2"&gt; PromptNestedEntityOptions&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;pneo =&lt;FONT color="#0000ff"&gt;New&lt;/FONT&gt;&lt;FONT size="2"&gt; PromptNestedEntityOptions(&lt;/FONT&gt;&lt;FONT color="#a31515" size="2"&gt;&lt;FONT color="#a31515" size="2"&gt;""&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size="2"&gt;)&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;pneo.NonInteractivePickPoint = acnsprompt.Value&lt;/P&gt;&lt;P&gt;&amp;nbsp;pneo.UseNonInteractivePickPoint =&lt;FONT color="#0000ff" size="2"&gt;&lt;FONT color="#0000ff" size="2"&gt;True&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size="2"&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;pneo.AllowNone =&lt;FONT color="#0000ff" size="2"&gt;&lt;FONT color="#0000ff" size="2"&gt;True&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size="2"&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;FONT color="#0000ff" size="2"&gt;&lt;FONT color="#0000ff" size="2"&gt;If&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size="2"&gt; acDoc.Editor.GetNestedEntity(pneo).ObjectId = ObjectId.Null &lt;/FONT&gt;&lt;FONT color="#0000ff" size="2"&gt;&lt;FONT color="#0000ff" size="2"&gt;Or&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size="2"&gt; &lt;/FONT&gt;&lt;FONT color="#0000ff" size="2"&gt;&lt;FONT color="#0000ff" size="2"&gt;Not&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size="2"&gt; IsNothing(acDoc.Editor.GetNestedEntity(pneo).ObjectId) &lt;/FONT&gt;&lt;FONT color="#0000ff" size="2"&gt;&lt;FONT color="#0000ff" size="2"&gt;Or&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size="2"&gt; &lt;/FONT&gt;&lt;FONT color="#0000ff" size="2"&gt;&lt;FONT color="#0000ff" size="2"&gt;Not&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size="2"&gt; IsDBNull(acDoc.Editor.GetNestedEntity(pneo).ObjectId) &lt;/FONT&gt;&lt;FONT color="#0000ff" size="2"&gt;&lt;FONT color="#0000ff" size="2"&gt;Then&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size="2"&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;FONT color="#0000ff" size="2"&gt;&lt;FONT color="#0000ff" size="2"&gt;Dim&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size="2"&gt; psubent &lt;/FONT&gt;&lt;FONT color="#0000ff" size="2"&gt;&lt;FONT color="#0000ff" size="2"&gt;As&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size="2"&gt; Entity = acTrans.GetObject(acDoc.Editor.GetNestedEntity(pneo).ObjectId,OpenMode.ForRead)&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" size="2"&gt;&lt;FONT color="#0000ff" size="2"&gt;If&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size="2"&gt; psubent.GetRXClass.Name.ToString = &lt;/FONT&gt;&lt;FONT color="#a31515" size="2"&gt;&lt;FONT color="#a31515" size="2"&gt;"AcDbText"&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size="2"&gt; &lt;/FONT&gt;&lt;FONT color="#0000ff" size="2"&gt;&lt;FONT color="#0000ff" size="2"&gt;Then&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size="2"&gt; &lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;FONT color="#0000ff" size="2"&gt;&lt;FONT color="#0000ff" size="2"&gt;If&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size="2"&gt; psubent.Layer.Contains(&lt;/FONT&gt;&lt;FONT color="#a31515" size="2"&gt;&lt;FONT color="#a31515" size="2"&gt;"APN"&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size="2"&gt;) &lt;/FONT&gt;&lt;FONT color="#0000ff" size="2"&gt;&lt;FONT color="#0000ff" size="2"&gt;Then&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size="2"&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" size="2"&gt;&lt;FONT color="#0000ff" size="2"&gt;Dim&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size="2"&gt; txt &lt;/FONT&gt;&lt;FONT color="#0000ff" size="2"&gt;&lt;FONT color="#0000ff" size="2"&gt;As&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size="2"&gt; DBText = &lt;/FONT&gt;&lt;FONT color="#0000ff" size="2"&gt;&lt;FONT color="#0000ff" size="2"&gt;DirectCast&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size="2"&gt;(psubent, Entity)&lt;/FONT&gt;&lt;FONT size="2"&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;FONT color="#0000ff" size="2"&gt;&lt;FONT color="#0000ff" size="2"&gt;End&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size="2"&gt; &lt;/FONT&gt;&lt;FONT color="#0000ff" size="2"&gt;&lt;FONT color="#0000ff" size="2"&gt;If&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size="2"&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;FONT color="#0000ff" size="2"&gt;&lt;FONT color="#0000ff" size="2"&gt;End&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size="2"&gt; &lt;/FONT&gt;&lt;FONT color="#0000ff" size="2"&gt;&lt;FONT color="#0000ff" size="2"&gt;If&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size="2"&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;psubent.Dispose()&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;FONT color="#0000ff" size="2"&gt;&lt;FONT color="#0000ff" size="2"&gt;End&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size="2"&gt; &lt;/FONT&gt;&lt;FONT color="#0000ff" size="2"&gt;&lt;FONT color="#0000ff" size="2"&gt;If&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size="2"&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;pneo =&lt;FONT color="#0000ff" size="2"&gt;&lt;FONT color="#0000ff" size="2"&gt;Nothing&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff"&gt;end if&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff"&gt;end using&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff"&gt;end while&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff"&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 18 Nov 2010 16:36:52 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/get-entity-inside-an-xref-given-a-point/m-p/2830337#M66005</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2010-11-18T16:36:52Z</dc:date>
    </item>
    <item>
      <title>Re: get entity inside an xref given a point</title>
      <link>https://forums.autodesk.com/t5/net-forum/get-entity-inside-an-xref-given-a-point/m-p/2834791#M66006</link>
      <description>Please see the below modified code is suitable for you. Dim acDoc As Document = Application.DocumentManager.MdiActiveDocument Dim acCurDb As Database = acDoc.Database While (True) Using acTrans As Transaction = acCurDb.TransactionManager.StartTransaction() Dim acBlkTbl As BlockTable acBlkTbl = acTrans.GetObject(acCurDb.BlockTableId, OpenMode.ForRead) Dim acBlkTblRec As BlockTableRecord acBlkTblRec = acTrans.GetObject(acBlkTbl(BlockTableRecord.ModelSpace), OpenMode.ForWrite) Application.SetSystemVariable("OSMODE", 512) Dim prent As PromptEntityOptions = New PromptEntityOptions("Specify Entity:") prent.SetRejectMessage("Only BlockReferences Allowed!") prent.AddAllowedClass(GetType(BlockReference), True) Dim rsent As PromptEntityResult = acDoc.Editor.GetEntity(prent) If Not rsent.Status = PromptStatus.OK Then Return Dim pneo As PromptNestedEntityOptions pneo = New PromptNestedEntityOptions("") pneo.NonInteractivePickPoint = rsent.PickedPoint pneo.UseNonInteractivePickPoint = True pneo.AllowNone = True If Not acDoc.Editor.GetNestedEntity(pneo).ObjectId = ObjectId.Null Or IsNothing(acDoc.Editor.GetNestedEntity(pneo).ObjectId) Or IsDBNull(acDoc.Editor.GetNestedEntity(pneo).ObjectId) Then Dim psubent As Entity = acTrans.GetObject(acDoc.Editor.GetNestedEntity(pneo).ObjectId, OpenMode.ForRead) If psubent.GetRXClass.Name.ToString = "AcDbText" Then If psubent.Layer.Contains("APN") Then Dim txt As DBText = DirectCast(psubent, Entity) End If End If psubent.Dispose() End If pneo = Nothing End Using End While</description>
      <pubDate>Wed, 24 Nov 2010 05:16:49 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/get-entity-inside-an-xref-given-a-point/m-p/2834791#M66006</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2010-11-24T05:16:49Z</dc:date>
    </item>
    <item>
      <title>Re: get entity inside an xref given a point</title>
      <link>https://forums.autodesk.com/t5/net-forum/get-entity-inside-an-xref-given-a-point/m-p/2835225#M66007</link>
      <description>&lt;P&gt;Thanks for the reply.&lt;/P&gt;</description>
      <pubDate>Wed, 24 Nov 2010 16:17:39 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/get-entity-inside-an-xref-given-a-point/m-p/2835225#M66007</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2010-11-24T16:17:39Z</dc:date>
    </item>
  </channel>
</rss>

