嘿,社区新手,虽然对VBA、autolisp cuis等有点经验。。。
对不起,如果我在这里的咆哮听起来有点混乱
我发现有人和我有类似的问题,但没有解决办法。
http://www.cadtutor.net/forum/showthread.php?t=40367
我有一个非常简单的脚本,它设置了一些参数,然后插入一个块,已经运行了很多年了
但在这张图上,它进入了块的插入,要求x比例,并重复我在使用工具栏lisp命令之前所做的任何命令。
如果我打开一个新的绘图或任何其他已绘制的绘图,插入效果很好,但在这张绘图中它不会,我可以重新开始绘图,但这让我发疯!
您可以在下面看到我的命令提示符的副本,以及它尝试执行我的最后一个命令的位置(即第行)
如果有人有想法,请告诉我
命令:(load“05-02-03”)正交输入模式[开/关]:开
命令:输入New、Existing、removing或Future?[新]n
-图层
当前层:“T-Data-Devc-Wall-N”
输入选项
[?/Make/Set/New/ON/OFF/Color/Ltype/LWeight/MATerial/Plot/PStyle/Freeze/Thaw/LOck
/解锁/状态]:s
输入要置为当前的图层名或:T-Data-Devc-Wall-N Enter
A选项
[?/Make/Set/New/ON/OFF/Color/Ltype/LWeight/MATerial/Plot/PStyle/Freeze/Thaw/LOck
/解锁/状态]:
命令:插入点
插入输入块名或[?]:05-02-03-NW。图纸
单位:英寸换算:0'-1“
指定插入点或[基点/比例/X/Y/Z/旋转]:
输入X比例因子,指定对角点或[角点/XYZ]:
命令:LINE指定第一个点:nil
指定第一点:*取消*
- ;Wall-Mounted Data Devices
- ;A.ARNONE
- ;UPDATED (7.11.06)
- ;start variable definition
- (setq usr3 (* (getvar "userr3")))
- (if (= usr3 3600.0) (setq r3 50))
- (if (= usr3 2400.0) (setq r3 25))
- (if (= usr3 1200.0) (setq r3 12.5))
- (IF (= USR3 600.0) (setq r3 6.25))
- (if (= usr3 480.0) (setq r3 5))
- (if (= usr3 360.0) (setq r3 3.75))
- (if (= usr3 240.0) (setq r3 2.5))
- (if (= usr3 120.0) (setq r3 1.25))
- (IF (= USR3 384.0) (SETQ r3 4))
- (IF (= USR3 192.0) (SETQ r3 2))
- (IF (= USR3 128.0) (SETQ r3 1.33333333333))
- (IF (= USR3 96.0) (SETQ r3 1))
- (IF (= USR3 64.0) (SETQ r3 0.666666666667))
- (IF (= USR3 48.0) (SETQ r3 0.5))
- (IF (= USR3 32.0) (SETQ r3 0.333333333333))
- (IF (= USR3 24.0) (SETQ r3 0.25))
- (IF (= USR3 16.0) (SETQ r3 0.166666666667))
- (IF (= USR3 12.0) (SETQ r3 0.125))
- (IF (= USR3 8.0) (SETQ r3 0.083333333333))
- (IF (= USR3 4.0) (SETQ r3 0.041666666667))
- (IF (= USR3 2.0) (SETQ r3 0.020833333333))
- (IF (= USR3 1.0) (SETQ r3 0.010416666667))
- (IF (= USR3 0) (SETQ r3 1))
- (setq newlayer "T-Data-Devc-Wall-N")
- (setq newlayercolor "3")
- (setq newlayerlineweight "0.50")
- (setq newlayerlinetype "Continuous")
- (setq newlayerplotstyle "Black")
- (setq lookupnew (tblsearch "LAYER" newlayer))
- (setq atriblocknw "05-02-03-NW.dwg")
- ;end variable definition
-
- (command "ortho" "on")
- ;Sets Working Layer
- (setq workinglayer (GETSTRING "Enter <N> New, <E> Existing, <D> Demolition, or <F> Future? [NEW]")) (terpri)
- (cond
- ((= workinglayer "N")
- ;checks and/or defines layer to draw on
- (if (= lookupnew nil)
- (command "-layer" "n" newlayer "s" newlayer "C" newlayercolor "" "L" newlayerlinetype "" "Lw" newlayerlineweight "" "PS" newlayerplotstyle "" "")
- (command "-layer" "s" newlayer "")
- ); END IF
- ;Sets P1 TO start point of Receptacle and Inserts Block
- (prompt "Insertion Point") (terpri)
- (setq p1 (getpoint))
- (command "insert" atriblocknw p1 r3 "")
- )
- ((= workinglayer "n")
- ;checks and/or defines layer to draw on
- (if (= lookupnew nil)
- (command "-layer" "n" newlayer "s" newlayer "C" newlayercolor "" "L" newlayerlinetype "" "Lw" newlayerlineweight "" "PS" newlayerplotstyle "" "")
- (command "-layer" "s" newlayer "")
- ); END IF
- ;Sets P1 TO start point of Receptacle and Inserts Block
- (prompt "Insertion Point") (terpri)
- (setq p1 (getpoint))
- (command "insert" atriblocknw p1 r3 "")
- )
- ((= workinglayer "")
- ;checks and/or defines layer to draw on
- (if (= lookupnew nil)
- (command "-layer" "n" newlayer "s" newlayer "C" newlayercolor "" "L" newlayerlinetype "" "Lw" newlayerlineweight "" "PS" newlayerplotstyle "" "")
- (command "-layer" "s" newlayer "")
- ); END IF
- ;Sets P1 TO start point of Receptacle and Inserts Block
- (prompt "Insertion Point") (terpri)
- (setq p1 (getpoint))
- (command "insert" atriblocknw p1 r3 "")
- )
- );end condition
|