- (defun c:ccc (/ p p0 p1 p2 pp pt_xy str ty)
- (defun pt_xy (e / s)
- (if (setq s
- (mapcar 'cdr
- (vl-remove-if-not '(lambda (x) (= (car x) 10))(entget e))
- )
- )
- (if (= 1 (length s))(car s)s)
- )
- )
- (setq str "1000X1000")
- (setq p (getpoint "\n插入点"))
- (command "_.Rectang" "non" p "non" (strcat "@" (vl-string-translate "X" "," str)))
- (setq ty (entlast))
- (setq
- pp(pt_xy ty)
- p1(car pp)
- p2(caddr pp)
- )
- (setq p0(mapcar '(lambda(x)(* 0.5 x)) (mapcar '+ p1 p2)))
- (command "rotate" ty "" p0) (command pause)
- (entmake
- (list
- (cons 0 "text")
- (cons 1 "12345")
- (cons 7 "standard")
- (cons 10 p0)
- (cons 11 p0)
- (cons 40 180)
- )
- )
- (princ)
- )
|