本帖最后由 cq4920 于 2023-6-15 00:06 编辑
这个多简单啊!
绘制矩形的方法太多了,我就直接弄个最简单的,你也可以根据REC的方法优化绘制矩形的函数,论坛太多了
- (defun c:rect (/ pt1 pt2 width height)
- (if (setq pt1 (getpoint "\n指定插入点: "))
- (progn
- (setq pt2 (getcorner pt1 "指定对角点"))
- (command "RECTANG" pt1 pt2)
- (command "CHPROP" (entlast) "" "LA" "EQUIP_消防" "")
- (command "-bhatch" "p" "stars" 10 180 "s" (entlast) "" "")
- (command "CHPROP" (entlast) "" "LA" "EQUIP_消防填充" "")
- (entmake (list '(0 . "TEXT") (cons 1 "XF300 F") (cons 10 pt2) (cons 40 150)(cons 62 3)))
- (command "CHPROP" (entlast) "" "LA" "EQUIP_消防文字" "")
- )
- )
- )
|