<?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: how to check the type of entity selected in .NET Forum</title>
    <link>https://forums.autodesk.com/t5/net-forum/how-to-check-the-type-of-entity-selected/m-p/2663397#M65978</link>
    <description>from the objectid returned by successful selection, use Objectid.ObjectClass.Name&lt;BR /&gt;
&lt;BR /&gt;
It will return the type name in ARX lingo, which means it will be "AcDb2dVertex", "AcDb3dPolylineVertex", or "AcDbVertex", depending on what kind of vertex it is.</description>
    <pubDate>Thu, 08 Apr 2010 23:55:49 GMT</pubDate>
    <dc:creator>chiefbraincloud</dc:creator>
    <dc:date>2010-04-08T23:55:49Z</dc:date>
    <item>
      <title>how to check the type of entity selected</title>
      <link>https://forums.autodesk.com/t5/net-forum/how-to-check-the-type-of-entity-selected/m-p/2663396#M65977</link>
      <description>Hi. is there any way to check the entity selected by NonInteractivePickPoint? iwant to get the ownerid if the item selected is a 3d or 2d vertex. How is it written in vb.net? thanks</description>
      <pubDate>Thu, 08 Apr 2010 23:12:09 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/how-to-check-the-type-of-entity-selected/m-p/2663396#M65977</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2010-04-08T23:12:09Z</dc:date>
    </item>
    <item>
      <title>Re: how to check the type of entity selected</title>
      <link>https://forums.autodesk.com/t5/net-forum/how-to-check-the-type-of-entity-selected/m-p/2663397#M65978</link>
      <description>from the objectid returned by successful selection, use Objectid.ObjectClass.Name&lt;BR /&gt;
&lt;BR /&gt;
It will return the type name in ARX lingo, which means it will be "AcDb2dVertex", "AcDb3dPolylineVertex", or "AcDbVertex", depending on what kind of vertex it is.</description>
      <pubDate>Thu, 08 Apr 2010 23:55:49 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/how-to-check-the-type-of-entity-selected/m-p/2663397#M65978</guid>
      <dc:creator>chiefbraincloud</dc:creator>
      <dc:date>2010-04-08T23:55:49Z</dc:date>
    </item>
    <item>
      <title>Re: how to check the type of entity selected</title>
      <link>https://forums.autodesk.com/t5/net-forum/how-to-check-the-type-of-entity-selected/m-p/2663398#M65979</link>
      <description>objectid.objectclass does not exist.&lt;BR /&gt;
Here is my code. im using vb.net by the way.&lt;BR /&gt;
&lt;BR /&gt;
Dim myDWG As ApplicationServices.Document&lt;BR /&gt;
Dim myDB As DatabaseServices.Database&lt;BR /&gt;
Dim myEd As EditorInput.Editor&lt;BR /&gt;
Dim myFilter(0) As DatabaseServices.TypedValue&lt;BR /&gt;
Dim myEnt As DatabaseServices.Entity = Nothing&lt;BR /&gt;
Dim myEnt2 As DatabaseServices.Entity = Nothing&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
myDWG = ApplicationServices.Application.DocumentManager.MdiActiveDocument&lt;BR /&gt;
myDB = myDWG.Database&lt;BR /&gt;
myEd = myDWG.Editor&lt;BR /&gt;
Dim tm As Autodesk.AutoCAD.DatabaseServices.TransactionManager = myDWG.TransactionManager&lt;BR /&gt;
&lt;BR /&gt;
Dim bObject As New EditorInput.PromptNestedEntityOptions("")&lt;BR /&gt;
Dim opt As EditorInput.PromptPointOptions = New EditorInput.PromptPointOptions("Pick point: ")&lt;BR /&gt;
bObject.NonInteractivePickPoint = myEd.GetPoint(opt).Value&lt;BR /&gt;
bObject.UseNonInteractivePickPoint = True&lt;BR /&gt;
&lt;BR /&gt;
Dim bRes As EditorInput.PromptNestedEntityResult = myEd.GetNestedEntity(bObject)&lt;BR /&gt;
If bRes.Status = EditorInput.PromptStatus.OK Then&lt;BR /&gt;
Using ta As Transaction = tm.StartTransaction&lt;BR /&gt;
myEnt = ta.GetObject(bRes.ObjectId, OpenMode.ForRead)&lt;BR /&gt;
&lt;BR /&gt;
'myEnt.objectId.objectClass here? myEnt.ObjectId.ObjectClass does not exist...&lt;BR /&gt;
&lt;BR /&gt;
End Using&lt;BR /&gt;
End If&lt;BR /&gt;
&lt;BR /&gt;
Edited by: a7v1n on Apr 9, 2010 12:07 AM

Edited by: a7v1n on Apr 9, 2010 12:29 AM</description>
      <pubDate>Fri, 09 Apr 2010 00:05:01 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/how-to-check-the-type-of-entity-selected/m-p/2663398#M65979</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2010-04-09T00:05:01Z</dc:date>
    </item>
    <item>
      <title>Re: how to check the type of entity selected</title>
      <link>https://forums.autodesk.com/t5/net-forum/how-to-check-the-type-of-entity-selected/m-p/3209494#M65980</link>
      <description>&lt;P&gt;I realize it has been a while since your post, but I just stumbled across this post again while looking for a different one.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;It has recently been brought to my attention that the ObjectClass property of the ObjectId object was made available in Acad 2009, so if you are (or were) using 2008 or earlier your only option would be to open the object and check it's type.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If you have since upgraded your AutoCAD version, or when you do so in the future, the ObjectClass property will be there, and is very handy for type checking things without opening them.&lt;/P&gt;</description>
      <pubDate>Fri, 28 Oct 2011 20:42:31 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/how-to-check-the-type-of-entity-selected/m-p/3209494#M65980</guid>
      <dc:creator>chiefbraincloud</dc:creator>
      <dc:date>2011-10-28T20:42:31Z</dc:date>
    </item>
  </channel>
</rss>

