明经CAD社区

 找回密码
 注册

QQ登录

只需一步,快速开始

搜索
查看: 6132|回复: 0

[求助】 帮忙修改个填充LSP

[复制链接]
发表于 2011-10-9 21:04:49 | 显示全部楼层 |阅读模式
麻烦版主 帮我将 这个LSP的填充时,在这个LSP里每次都提示输入比例因子,每更换一次比例因子,图纸的全局比例跟着变化,很麻烦,麻烦版主能不能帮忙改下这个LSP,能将每次比例因子提示输入去掉,谢谢
;-----------------------------------------------------------------------
;-----------------------------------------------------------------------
(DEFUN C:EH    () (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   pp2  ppb "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) ""
)           
(if  pt0
(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 hpnn(xx)
   (IF(= xx "钢筋混凝土")   (PROGN(SETQ Bly 10)(SETQ Agle 0.00)(SETQ TA xx)))
   (setq XX4 (* bscal Bly))
)

您需要登录后才可以回帖 登录 | 注册

本版积分规则

小黑屋|手机版|CAD论坛|CAD教程|CAD下载|联系我们|关于明经|明经通道 ( 粤ICP备05003914号 )  
©2000-2023 明经通道 版权所有 本站代码,在未取得本站及作者授权的情况下,不得用于商业用途

GMT+8, 2024-11-29 12:59 , Processed in 0.206048 second(s), 28 queries , Gzip On.

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

快速回复 返回顶部 返回列表