以下修改应实现UCS兼容性:
- (defun c:test ( / a e s x )
- ;;; Tharwat 27.4.2015 ;;;
- (if
- (and
- (setq s (entsel "\nSelect polyline to trim segment: "))
- (setq e (car s)
- x (entget e)
- )
- (= "LWPOLYLINE" (cdr (assoc 0 x)))
- )
- (if (= 2 (cdr (assoc 90 x)))
- (entdel e)
- (progn
- (setq a (fix (vlax-curve-getparamatpoint e (vlax-curve-getclosestpointto e (trans (cadr s) 1 0)))))
- (command
- "_.break" s "_f"
- "_non" (trans (vlax-curve-getpointatparam e a) 0 1)
- "_non" (trans (vlax-curve-getpointatparam e (1+ a)) 0 1)
- )
- )
- )
- )
- (princ)
- )
良好溶液Tharwat |