thanks for the routine, but what if you have open polylines? I have several polylines which I want to make them one, but when I use the pedit it does not do it!! when I want to use some lisps on them, it says that object is self intersecting, how can I spot this?
@Anonymous wrote:thanks for the routine, but what if you have open polylines? I have several polylines which I want to make them one, but when I use the pedit it does not do it!! when I want to use some lisps on them, it says that object is self intersecting, how can I spot this?
quick fix
Replace
(if ss (setq en2 (ssname ss 0)))
to
(if ss (progn (setq en2 (ssname ss 0))(vla-put-closed (vlax-ename->vla-object en2) 1)))
for both en1 and en2
These lines will force the pline to cliose
HTH
@Anonymous wrote:Thanks but I don't wanna close it!!!! it is supposed to be an open line
Will Bpoly work for you?
(defun c:Breg (/ el ss i) (defun _Entnext (e) (if (setq e (entnext e)) (cons e (_Entnext e)) ) ) (setq el (entlast) ss (ssadd) ) (prompt "\nSelect point") (command "_.bpoly") (while (> (getvar "CMDACTIVE") 0) (command pause)) (mapcar '(lambda (x) (ssadd x ss)) (_Entnext el)) (repeat (setq i (sslength ss )) (command "_region" (ssname ss (setq i (1- i))) "") (entdel (ssname ss i)) ) )
It creates region for every succesful generated bounday
@Anonymous wrote:Thanks but I don't wanna close it!!!! it is supposed to be an open line
in that case
(if ss (progn (setq en1 (ssname ss 0)) (vla-put-closed (setq en1 (vla-copy (vlax-ename->vla-object en1))) 1) (setq en1 (vlax-vla-object->ename en1))) ) (setq prevEnt (entlast)) (command "region" en1 "") (entdel en1)
and
(setq prevEnt (entlast))
(command "region" en2 "")
(entdel en2)
(setq newEnt (entlast))
for both en1 and en2
I also work with polylines to measure space inside buildings, and i have come across an issue. an older drawing we have in a very large building seems to have an overlapping space somewhere in the drawing, so the total areas of each room is greater than the total floor boundry area.
for example in the attatched dwg, space a is overlapping b, but since it is perfectly overlapped its very hard to notice.
does anyone know a command or even just a general trick that could help point out an area like this?
thanks!