- 积分
- 1167
- 明经币
- 个
- 注册时间
- 2002-7-25
- 在线时间
- 小时
- 威望
-
- 金钱
- 个
- 贡献
-
- 激情
-
|
我这有一个能修改原有HATCH文件(grid.pat),而直接填充自定X,Y尺寸(但是好象只能输入300,600,900,1200的建筑基数)的LSP,可以作为参考,加以完善命令!
希望有人能改改,使之修改HATCH的比例或间距的命令改为能单独修改HATCH的X,Y轴的比例或间距!
;[XG.LSP]BY jeep 08Jan04 ;TO DRAW CEILING GRID (defun c:xg (/ a -a b c) (getnewline) (setvar "cmdecho" 0) (setq snap (getvar "osmode")) (setq OLDERR *ERROR* *ERROR* MYERROR pt1 (getpoint "\nSetting up point:") distY (getstring "\nLength of grid :") distX (getstring "\nHeight of grid :") pt2 (getpoint pt1 "\nAngle of grid :") ) (setq angleX (angle pt1 pt2)) (setq angleY (+ angleX (/ 3.14159265358979323846264338327950288419716939937510 2)))
(setq angleX (* angleX 57.2957795130823208767981548141326)) (setq angleY (* angleY 57.2957795130823208767981548141326))
(setq Line1 (strcat (rtos angleX 2 5) ",0,0,0," distX)) (setq Line2 (strcat (rtos angleY 2 5) ",0,0,0," distY))
(setq FILENAME "GRID.PAT") (setq OPENFILE (open FILENAME "w")) (write-line "*GRID, XGrid" OPENFILE)
(write-line Line1 OPENFILE) (write-line Line2 OPENFILE)
(write-line "" OPENFILE) (close OPENFILE)
(princ "\nSelect Polyline to fill:") (setq select (ssget))
(command "snapbase" pt1) (command "-bhatch" "P" "GRID" "" "" "S" select "" "") (command "snapbase" 0,0) (setq *ERROR* OLDERR)
(princ) );END OF XG.LSP
|
|