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

Catch entities which intersected with a polyline

3 REPLIES 3
SOLVED
Reply
Message 1 of 4
MECODER
594 Views, 3 Replies

Catch entities which intersected with a polyline

Hi All,

I have good experince with VB.Net, But i am new in prgramming for Autocad .

I had wrote code that catch all polylines on drawing, but now i have a  problem, i need to catch that entities (blocks in my case) which intersected  with each polyline.

any help please.

Thank you in advance.

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

Hi , to get intersection point between to entities you have to use 'entity.IntesectWith' function. With this function, you can get intersecting point. if for an entity if you get intersection point , you can add that entity in your list or array. you can have a look on below link where you can find how intersection point can be found between 2 entities.

http://forums.autodesk.com/t5/NET/Find-intersection-point-of-two-lines/m-p/4769671#M38812
Message 3 of 4
MECODER
in reply to: mzakiralam

Thank you very much Mr. mzakiralam
This is good try.
I know how to get intersection points using (IntersectWith) function, My problem is how to specify the type of the entity that intersects with the polyline.

Message 4 of 4
mzakiralam
in reply to: MECODER

 entity.GetType() will help you to get entity type. you can also use below function.

 

Dim ent as entity = transaction.GetObject(ObjectId, OpenMode.Write)

 

If TypeOf ent is Polyline

 

'do as you want

 

End If

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