明经CAD社区

 找回密码
 注册

QQ登录

只需一步,快速开始

搜索
查看: 399|回复: 0

[提问] 哪位高手帮忙给看看这个关于填充的lisp

[复制链接]
发表于 2015-11-4 09:10 | 显示全部楼层 |阅读模式
本帖最后由 wjnnan 于 2015-11-4 12:24 编辑

各位好,我写了一个关于修改填充图案比例的lisp,程序运行成功,但是cad中图形的填充图形没有更新,哪位帮忙给看看啊
;修改填充图案比例
(defun C:gtb (/ hpsc ss ent old_hatchbl new_hatchbl)
    (setvar "cmdecho" 0)
    (setq hpsc (getvar "hpscale"))
          (princ "\n请选择填充图案")
    (setq ss (ssget '((0 . "hatch"))) )         
          (setq ent (entget (entlast)))
        (setq old_hatchbl (cdr (assoc 41 ent)))        
    (princ "\n改变填充图案的比例:")
    (setq new_hatchbl (getreal (strcat "\n请输入填充图案的比例 <""当前比例" (rtos old_hatchbl 2 0)">:")))
    (if (= new_hatchbl nil) (setq new_hatchbl old_hatchbl))
    (entmod (subst (cons 41 new_hatchbl) (assoc 41 ent) ent))
        (setvar "hpscale" hpsc)
    (princ)
);end defun


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

本版积分规则

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

GMT+8, 2024-4-25 22:00 , Processed in 4.901722 second(s), 29 queries , Gzip On.

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

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