(command "line" ptq ptz "") (setq el (entlast)) (setq curve-obj (vlax-ename->vla-object el)) (setq ptdis (vlax-curve-getPointAtDist curve-obj 10))
(setq lenga (vlax-curve-getDistAtParam curve-obj(vlax-curve-getEndParam curve-obj))) (setq ptdise (vlax-curve-getPointAtDist curve-obj (- lenga 10))) (setq ptq (vlax-curve-getStartPoint curve-obj)) (setq ptz (vlax-curve-getEndPoint curve-obj)) (setq ssH (ssget "c" ptq ptdis)) (setq mzH (ssname ssH 0)) (command "_.lengthen" "de" offset mzH "" "");一端延长 (setq ssH (ssget "c" ptdise ptz )) (setq mzH (ssname ssH 0)) (setq qH (entget mzH))(command "_.lengthen" "de" offset mzH "" "");另一端延长 可是结果是一端延长两次而不是两端延长,请高手指点 |