AcadObject What type

AcadObject What type

Anonymous
Not applicable
334 Views
3 Replies
Message 1 of 4

AcadObject What type

Anonymous
Not applicable
Hello:
How I will know what type the object is the object selected???

ThisDrawing.Utility.GetEntity objEntiti, pick,"select the object"

I dont know what object in plane. Thanx!!
0 Likes
335 Views
3 Replies
Replies (3)
Message 2 of 4

Anonymous
Not applicable
If TypeOf objEntiti Is AcadLine Then
''It is Line
ElseIf TypeOf objEntiti Is AcadCircle Then
'' It is a circle
ElseIf...
...
End If


wrote in message news:5082129@discussion.autodesk.com...
Hello:
How I will know what type the object is the object selected???

ThisDrawing.Utility.GetEntity objEntiti, pick,"select the object"

I dont know what object in plane. Thanx!!
0 Likes
Message 3 of 4

Anonymous
Not applicable
But in the plane can will exist milles the object. Exist a method more generic???, thanx!!!
0 Likes
Message 4 of 4

Anonymous
Not applicable
Shouldn't the GetEntity() method only return one entity?

In the case your user could pick any type of entity, shouldn't you, as
developer, has some idea on what type of entities your app is expecting. If
your app at this point accepts any type of entity, then that could mean your
app only is concerned about the generic type (that is,AcadEntity). The is
why GetEntity() gets you a generic entity, AcadEntity.

You can also use objEntiti.ObjectName to tell what the entity type is. But,
there is little difference:

If TypeOf objEntiti Is AcadObject then

else If....

or

If objEntiti.ObjectName="AcDb..." Then

ElseIf objEntiti.ObjectName=...Then
...

wrote in message news:5082196@discussion.autodesk.com...
But in the plane can will exist milles the object. Exist a method more
generic???, thanx!!!
0 Likes