代码定义坐标点
大家好,我想用代码lisp定义坐标点,但有错误(lselsetp或lentyp)。我试着去做,但失败了。希望大家帮帮我。谢谢大家阅读我的帖子;=============================================================================================
(defun LM:IntersectionsinSet ( ss / a b i j l )
(setq i (sslength ss))
(while (not (minusp (setq j (1- i) i (1- i))))
(setq a (vlax-ename->vla-object (ssname ss i)))
(while (not (minusp (setq j (1- j))))
(setq b (vlax-ename->vla-object (ssname ss j))
l (cons (LM:GroupByNum (vlax-invoke a 'IntersectWith b acExtendNone) 3) l)
)
)
)
(apply 'append l)
)
(defun LM:GroupByNum ( l n / r)
(if l
(cons
(reverse (repeat n (setq r (cons (car l) r) l (cdr l)) r))
(LM:GroupByNum l n)
)
)
)
;=============================================================================================
(defun c:td (/ qa i)
(command "_.STYLE" "VNI" "VN_VNI.SHX" "0.0" "1" "0" "" "" "")
(setq qa (ssget))
(setq qa1 (ssget))
(setq k 0)
(while (setq e (ssname qa1 k))
(setq qa (ssadd e qa))
(setq k (1+ k))
)
(setq lst (LM:IntersectionsinSet qa))
(foreach item lst
(setq laynd (entget item))
(setq ndd (cdr (assoc 10 laynd)))
(setq XCOC (car ndd))
(command "_.TEXT" "S" "VNI" "MR" item "1.8" "90" (rtos XCOC 2 0))
)
(princ))
更改:
(foreach item lst
(setq laynd (entget item))
(setq ndd (cdr (assoc 10 laynd)))
(setq XCOC (car ndd))
收件人:
(foreach item lst
(setq XCOC (car item))
页:
[1]