.NET
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Get entity type

3 REPLIES 3
SOLVED
Reply
Message 1 of 4
gulzar25
2706 Views, 3 Replies

Get entity type

Hi,

I filtering for objects based on layer as shown below.How do i know which type the entity is like whether it is arc or line or circle.Any ideas please.

 

Dim ss As SelectionSet

Dim idarray As ObjectId() = ss.GetObjectIds()

 

Dim id AsObjectId

For Each id In idarray

    Dim entity As = trLocal.GetObject(id, OpenMode.ForRead, True)

Next id

3 REPLIES 3
Message 2 of 4
mzakiralam
in reply to: gulzar25

entity.GetType() will help you.

Regards
Zakir
Message 3 of 4

You can probably try:

 

For Each id In idarray
    Dim ent As Entity = trLocal.GetObject(id, OpenMode.ForRead, True)

    if (typeof ent is Arc) then

   

    else if (typeof ent is Line) then

 

    end if
Next id

Regards,



Augusto Goncalves
Twitter @augustomaia
Autodesk Developer Network
Message 4 of 4

Thanks a lot for the replies 🙂

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk DevCon in Munich May 28-29th


Autodesk Design & Make Report

”Boost