- ; (-3 ("SOUTH" (1000 . "202101") (1000 . "20230409.351")) ("S_GXRQ" (1071 . 1681198240))) ;参加建模的高程点
- ; (-3 ("S_GXRQ" (1071 . 1681198240)) ("SOUTH" (1000 . "202101") (1070 . 1))) ;不参加建模的高程点
- ; (assoc "SOUTH" (cdr(assoc -3 (entget(car(entsel ""))'("*")))))
- ; (append (assoc "SOUTH" (cdr(assoc -3 (entget(car(entsel ""))'("*"))))) (list(cons 1070 1)))
- ;选择集与对象名表互转
- (defun cx-ss2en
- (ss / enlst)
- (cond
- ((= (type ss) 'PICKSET)
- (vl-remove-if-not '(lambda (x) (= (type x) 'ENAME)) (mapcar 'cadr (ssnamex SS)))
- )
- ((= (type ss) 'LIST)
- (setq enlst (ssadd))
- (last (mapcar '(lambda (x) (ssadd x enlst)) ss))
- )
- ((='ename(type ss))
- (ssadd ss)
- )
- )
- )
- ;(entget(car(entsel))'("*"))
- (defun c:bujm ( / ss old new new1)
- (setq ss (ssget '((0 . "INSERT")(2 . "GC200") ) ))
- (foreach x (cx-ss2en ss)
- (setq old (assoc "SOUTH" (cdr(assoc -3 (entget x '("*"))))) )
- (setq new (append old (list(cons 1070 1))) )
- (setq new1 (subst new old (assoc -3 (entget x '("*")) ) ))
- (entmod (subst new1 (assoc -3 (entget x '("*")) ) (entget x '("*")) ) )
- (princ)
- )
- )
|