这可能会让你开始,尽管我没有得到你特别想要的。
将此作为一个示例。
- (defun c:TesT (/ ss p2 l d n)
- ;;; Tharwat 21. Feb. 2012 ;;;
- (if (and
- (setq ss (entsel "\n Select a Poly :"))
- (member (cdr (assoc 0 (entget (car ss))))
- '("LINE" "SPLINE" "LWPOLYLINE" "POLYLINE")
- )
- (setq p2 (1+ (fix (vlax-curve-getendparam (car ss)))))
- (setq l (vlax-curve-getdistatparam (car ss) (- p2 1)))
- (setq d (getdist "\n Specify the distance between points :"))
- (setq n d)
- )
- (progn
- (entmake
- (list '(0 . "POINT")
- (cons 10 (vlax-curve-getpointatparam (car ss) 0))
- )
- )
- (repeat
- (fix (/ l d))
- (setq pt (vlax-curve-getpointatdist (car ss) d))
- (entmake (list '(0 . "POINT") (cons 10 pt)))
- (setq d (+ n d))
- )
- )
- (princ)
- )
- (princ)
- )
|