大家好,如何将entmake创建垂直标注的文字方向转换成和用command命令创建标注的文字方向调成一致呢
- (defun c:test()
- (setvar "cmdecho" 0) ;关闭普通命令提示信息
- (setvar "osmode" 0) ;关闭对象捕捉状态
- (setq pt1(getpoint "请输入插入的位置:")
- d1 500
- d2 400
- d3 3000
- d4 1.5)
- (setq p1 (list (car pt1) (+ (cadr pt1) 148.5))
- p2 (list (car pt1) (+ (cadr p1) (- d1 (* d4 2))))
- p3 (list (car pt1) (+ (cadr p2) (- d2 (* d4 2) 148.5)))
- p4 (list (+ (car pt1) d3) (cadr p3))
- p5 (list (car p4) (cadr p2))
- p6 (list (car p4) (cadr p1))
- p7 (list (car p4) (cadr pt1)))
- (command "line" pt1 p1 p2 p3 p4 p5 p6 p7 "c")
- (entmake (list '(0 . "DIMENSION") '(100 . "AcDbEntity") '(100 . "AcDbDimension") (cons 10 (list (+ (car p1) -50) (+ (cadr p1) 50)) ) '(70 . 32) '(1 . "") '(100 . "AcDbAlignedDimension") (cons 13 p1) (cons 14 pt1) '(50 . 1.5708) '(100 . "AcDbRotatedDimension")))
- (command "dimlinear" p1 p2 "@-50,50")
- (command "dimlinear" p2 p3 "@-50,50")
- (setvar "osmode" 16383) ;打开对象捕捉状态
- (command "._undo" "_end")
- (princ) ;静默退出
- )<img src="http://bbs.mjtd.com/forum.php?mod=image&aid=133049&size=300x300&key=daa4a3325d67f2d4&nocache=yes&type=fixnone" border="0" aid="attachimg_133049" alt="">
|