想弄个自动分层,就搞了个反应器,标注完成之后尺寸线自动分到标注层,可是,以下代码只能用于单个单个的标注,
然而连续标注、基线标注反应不了。谁给点意见?
- (or *vlrdimEnd*
- (setq *cmdvlr* (vlr-command-reactor
- nil
- '(
- (:VLR-commandEnded . layercallback)
- )
- )
- )
- )
- (or *vlrdimCancell*
- (setq *cmdvlr* (vlr-command-reactor
- nil
- '(
- (:vlr-commandCancelled . layercallback)
- )
- )
- )
- )
- (defun layercallback (x1 x2 / info)
- (if (wcmatch (car x2) "DIM*")
- (PROGN
- (setq info (entget (entlast)))
- (entmod (subst (cons 8 "02标注") (assoc 8 info) info))
- )
- )
- )
- (princ)
|