Author Topic: find the break in polylines  (Read 1828 times)

0 Members and 1 Guest are viewing this topic.

viva

  • Guest
find the break in polylines
« on: September 28, 2006, 07:19:42 AM »
hi everybody,
                  i want 2 check the polylines whether its there any gap. if there is any gap means i want 2 place a circle at the starting or ending point of  the polyline as shown in the attached drawing. can anyone give me some logic.

i had tried,  i cant able 2 proceed

thanks in advance

regards
vivek

daron

  • Guest
Re: find the break in polylines
« Reply #1 on: September 28, 2006, 08:19:25 AM »
I believe you can find the start point and endpoint of a pline and then use command 2p to make the circle. Now, not having looked at your drawing, I assume you might have a pline that has multiple breaks. This would be a little more complicated, but if you find points that are a certain distance apart, you might be able to program the proper start and end points. Sorry, not much help in the programming arena. I just don't have the time for it.

T.Willey

  • Needs a day job
  • Posts: 5251
Re: find the break in polylines
« Reply #2 on: September 28, 2006, 11:21:50 AM »
To check if a polyline has a break in it, then see if it is closed. Dxf code 70, or with ActiveX controls (vla-get-Closed PolylineObject).

If you want to see if IT SHOULD be closed, meaning the start point and end points are the same, then I would use
Code: [Select]
(equal
 (setq StPt (vlax-curve-getStartPoint PolylineEntity))
 (setq EndPt (vlax-curve-getEndPoint PolylineEntity))
 0.0001
)
Then if they don't meet, then you can just use the two variables you just make 'StPt' and 'EndPt' as the points to draw your circles.
Tim

I don't want to ' end-up ', I want to ' become '. - Me

Please think about donating if this post helped you.