嘿,伙计们。。晚上好(印度时间)
我的Lisp文件未插入阻止其显示为零
请帮我找出我在这个Lisp程序中犯的错误
- (defun c:Ins (/ cmh osm att old_error block user x y z Point Rot Pt)
- (defun err (msg)
- (if
- (or
- (= msg "Function cancelled")
- (= msg "quit / exit abort")
- )
- (progn
- (princ "\n***Error Somthing Went Wrong***")
- (princ "\n***Restoring System Variables***")
- )
- )
- (setvar 'cmdecho cmh)
- (setvar 'osmode osm)
- (setvar 'Attreq att)
- (princ)
- )
- (setq cmh(getvar 'cmdecho))
- (setq osm(getvar 'osmode))
- (setq att(getvar 'attreq))
- (setvar 'cmdecho 0)
- (setvar 'osmode 0)
- (setvar 'attreq 0)
- (setq old_error *error* *error* err)
- (if (setq block(getfiled "Select Block" "C:\\MYBLOCKS\" "dwg" 2))
- (progn
- (initget "I C")
- (prompt "\nType (I) For Insertion On Screen (C) Input Co-Ordinates")
- (setq user (getkword "\nInsertion On Screen /Input Co-Ordinates :<<Insertion On Screen>>:"))
- (if (or (= user "") (= user nil))
- (setq user "I")
- )
- (if (= user "C")
- (progn
- (setq X(getreal "\nEasting Value(X):")
- Y(getreal "\nNorthing Value(Y):")
- Z(Getreal "\nAltitude Value(Z):")
- Point(list x y z)
- rot (getangle "\nRotation Angle :")
- )
- (entmakex (list (cons 0 "INSERT")
- (cons 2 block)
- (cons 10 Point)
- (cons 50 rot)
- )
- )
- )
- (progn
- (setq rot(getangle "\nRotation Angle:"))
- (setq pt (getpoint "\Specify insertion point:"))
- (entmakex (list (cons 0 "INSERT")
- (cons 2 block)
- (cons 10 Pt)
- (cons 50 rot)
- )
- )
- )
- )
- )
- )
- (setvar 'osmode osm)
- (setvar 'cmdecho cmh)
- (setvar 'attreq att)
- (setq *error* old_error)
- (princ)
- )
-
|