明经CAD社区

 找回密码
 注册

QQ登录

只需一步,快速开始

搜索
查看: 2288|回复: 5

求助------Lisp中如何調整線型比例?

[复制链接]
发表于 2009-4-10 11:01:00 | 显示全部楼层 |阅读模式
各位大哥,請問如何在LISP中設置線型比例?因我編好一個小程序,裡面有中心線及虛線等,命令執行完後,中心線總是顯得很密很密。先謝謝大家了!
发表于 2009-4-10 17:14:00 | 显示全部楼层
修改dxf组码45
发表于 2009-4-11 00:54:00 | 显示全部楼层

改线形比例--命令爲GL

本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有账号?注册

x
 楼主| 发表于 2009-4-11 13:46:00 | 显示全部楼层

 

樓上的大哥們,這是我寫的小程序,但上面你們的提示,我還是不明白怎麼做,請幫我在LISP中修改一下中心線的線型好嗎?非常感謝!附件為原文件。

本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有账号?注册

x
发表于 2009-4-16 22:36:00 | 显示全部楼层

试试偶的这个

(defun C:ll ()
  (setq olderr *error*
 *error* BZERR
  )
  (princ "\n******画虚线******")

  (while t
    (setvar "cmdecho" 0)
  (setq pa (getpoint "\n 请指定虚线第一点:"))
  (setq pb (getpoint pa"\n 请指定下一点:"))

   (setq hh (distance pa pb))
  (command "LINE" pa pb"")
  (if (<= hh 2 )
  (command "change" (entlast) "" "p" "color" "252" "ltype" "DASHED2" "S" "1" ""))
    (if (> hh 2.000001 )
(command "change" (entlast) "" "p" "color" "252" "ltype" "DASHED2" "S" "2" ""))
    (if (> hh 5.00001 )
(command "change" (entlast) "" "p" "color" "252" "ltype" "DASHED2" "S" "5" ""))
    (if (> hh 30.0000 )
(command "change" (entlast) "" "p" "color" "252" "ltype" "DASHED2" "S" "10" ""))
    (if (> hh 50.000001 )
(command "change" (entlast) "" "p" "color" "252" "ltype" "DASHED2" "S" "15" ""))
    ;(if (> hh 90.000001 )
;(command "change" (entlast) "" "p" "color" "252" "ltype" "DASHED2" "S" "30" ""))
      (princ "\n")
    )

  (setq *error* olderr)
  (princ)
)

;;;;;;;;;;********************************

(defun CLL ()
  (setq olderr *error*
 *error* BZERR
  )
  (princ "\n******画中心线******")

  (while t
    (setvar "cmdecho" 0)
  (setq pa (getpoint "\n 请指定中心线第一点:"))
  (setq pb (getpoint pa"\n 请指定下一点:"))

   (setq hh (distance pa pb))
  (command "LINE" pa pb"")
  (if (<= hh 10 )

  (command "change" (entlast) "" "p" "color" "1" "ltype" "CENTER" "S" "1" ""))
    (if (> hh 10.000001 )
(command "change" (entlast) "" "p" "color" "1" "ltype" "CENTER" "S" "2" ""))
    (if (> hh 20.0000 )
(command "change" (entlast) "" "p" "color" "1" "ltype" "CENTER" "S" "5" ""))
    (if (> hh 50.000001 )
(command "change" (entlast) "" "p" "color" "1" "ltype" "CENTER" "S" "8" ""))
    (if (> hh 80.000001 )
(command "change" (entlast) "" "p" "color" "1" "ltype" "CENTER" "S" "12" ""))
      (princ "\n")
    )

  (setq *error* olderr)
  (princ)
)

发表于 2012-6-4 07:31:17 | 显示全部楼层
本帖最后由 1993063 于 2012-6-3 13:32 编辑

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

本版积分规则

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

GMT+8, 2025-9-25 11:22 , Processed in 0.182047 second(s), 26 queries , Gzip On.

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

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