- (Defun c:demo () (if (and (setq pline (car (entsel "\nSelect Polyline:"))) (eq (cdr (assoc 0 (entget pline))) "LWPOLYLINE") (setq int (getdist "\nEnter Interval:")) (setq in int) ) [color=red][b](while (Setq pt (vlax-curve-getPointAtDist pline int)) (setq ppt (vlax-curve-getparamatpoint pline pt)) (vlax-invoke (vlax-ename->vla-object pline) 'AddVertex (1+ (fix ppt)) (list (car pt) (Cadr pt)) ) (setq int (+ int in)) )[/b][/color] ) )
thanks for your timr dude
here the lines i dont understand (RED)
- after getting the poly id and interval info you assign in to int why?
- (than the while loops until nill)
- pt get the first point according to the interval
- ppt than get the distance up to this point
- than you invoke conversion and the call AddVertex
- than you advance ppt by 1 , why?
- than you make a list of the entity, why?
(its open to everyone:) )
Thanks
Shay |