[求助]那位高手帮忙附件填充LSP的比例因子设置取消
这个LSP是关于填充的LSP,快捷命令式EH(框选填充)RH(线框填充),在这个LSP里每次都提示输入比例因子,每更换一次比例因子,图纸的全局比例跟着变化,很麻烦,那位高手能将每次比例因子提示输入去掉,谢谢 你在填充命令的后面,提示输入那里加两个""不就行了?代码短的话,直接粘代码吧.懒得下载 ;-----------------------------------------------------------------------;-----------------------------------------------------------------------
(DEFUN C:EH ()(scale) (hpnn "钢筋混凝土") (hh))
;;;---------------------------------------------------------------
(DEFUN C:RH ()(scale) (hpnn "钢筋混凝土") (hhh))
;;;---------------------------------------------------------------
(defun hh ()
(setvar "cmdecho" 0)
(setq blipm (getvar "blipmode"))
(setvar "blipmode" 0)
(setq pp1 (getpoint "getpoint :"))
(setq pp2 (getcorner pp1"nextpoint :"))
(if (or (= pp1 nil) (= pp2 nil)) ""
(progn
(setq osn (getvar "osmode"))
(command "undo" "group")
(setvar "osmode" 0)
(setq ppa (list (car pp2)(cadr pp1)))
(setq ppb(list (car pp1) (cadr pp2)))
(setq ptlist ( list pp1 ppa pp2 ppb))
(setq plw(getvar "plinewid"))
(setvar "plinewid" 0)
(command "pline" pp1 ppa pp2ppb "c")
(setvar "plinewid" plw)
(setq eedel(entlast))
(if (tblsearch "layer" "PUB_HATCH") ""
(command "layer" "New" "PUB_HATCH" "c" "8" "PUB_HATCH" "")
);end if
(command "hatch" TA XX4 Agle "l" "")
(command "change" (entlast) "" "P" "la" "PUB_HATCH" "")
(entdel eedel)
(setvar "blipmode" blipm)
(setq redent(ssget "f" ptlist))
(if (= redent nil)""
(progn
(setq i 1)
(setq rden (ssname redent 0))
(while rden
(redraw rden)
(setq rden (ssname redent i))
(setq i (+ i 1))
);end while
);; progn
) ;;end if
);end progn
);end if
(setvar "osmode" osn)
(command "undo" "end")
);end defun
;;;----------------------------------------------------------------
(defun hhh()
(setq *error*ff_err)
(if (= (getvar "hpname") "")
(prompt " NO hatch pattern selected: ")
(progn
(command "undo" "group")
(setvar "cmdecho" 0)
(setq blipm(getvar "blipmode"))
(setvar "blipmode" 0)
(setq pt0 (getpoint "get first point : "))
(if pt0
(progn
(setq ptlist nil)
(setq pt1 pt0)
(setq osm(getvar "osmode"))
(setvar "osmode" 0)
(command ".pline" pt0 pt1 "")
(setvar "osmode" osm)
(setq pl0(entlast))
(while pt0
(setq ptlist(cons pt0 ptlist))
(setq ptn pt0)
(setq pt0(getpoint pt0 "next point: "))
(if (or (equal pt0 pt1) (= pt0 nil))
(setq pt0 nil) ""
)
(ifpt0
(progn
(setvar "osmode" 0)
(command ".pline" ptn pt0 "")
(setvar "osmode" osm)
(setq pln(entlast))
(command "pedit" pl0 "j" pln "" "")
(setq pl0(entlast))
(redraw pl0 3)
)
(progn
(command ".pline" ptn pt1 "")
(command "pedit" pl0 "j" (entlast) "" "")
)
) ;; end if
) ;;end while
(setq pl0(entlast))
(command "hatch" TA XX4 Agle "l" "")
(entdel pl0)
(if (tblsearch "layer" "PUB_HATCH") ""
(command "layer" "New" "PUB_HATCH" "c" "8" "PUB_HATCH" "")
)
(command "change" (entlast) "" "P" "la" "PUB_HATCH" "")
(setq i 0)
(if (setq obj(ssget "f" ptlist))
(repeat (sslength obj)
(redraw (ssname obj i) )
(setq i(+ i 1))
)
""
)
) (prompt "cancel") )
(setvar "blipmode" blipm)
(command "undo" "end")
)
))
(PRINC "Start with Va or Wa")
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(defun scale()
(if (= c nil)
(setq c (getvar "dimscale"))
)
(setq rr1 c)
(setq rr2 (rtos c 2 2 ))
(setq c (getreal (strcat "\nScale<" rr2 ">:")))
(if (= c nil)
(setq c rr1)
)
(setvar "dimscale" c)
(setvar "ltscale" c)
(setq bscal c)
(setq bb (rtos bscal 2 0))
(setq UU(getvar "ucsname"))
(IF(= uu "")
(setq uu "WORLD")
)
(setvar "modemacro"(strcat "|全局比例="bb"|当前坐标="UU"|"))
)E1 E2 E3 E7 E8
;;;----------------------------------------------------------------
(DEFUN hpnn(xx)
(IF(= xx "钢筋混凝土") (PROGN(SETQ Bly 10)(SETQ Agle 0.00)(SETQ TA xx)))
(setq XX4 (* bscal Bly))
) tian4185tt 发表于 2011-10-7 14:54 static/image/common/back.gif
;-----------------------------------------------------------------------
;------------------------- ...
怎么加加在哪
页:
[1]