明经CAD社区

 找回密码
 注册

QQ登录

只需一步,快速开始

搜索
查看: 785|回复: 0

[提问] 引线出来注写文字

[复制链接]
发表于 2016-7-1 18:00:36 | 显示全部楼层 |阅读模式
;;------------------------------------------------------------------------------------
(defun C:get2()
(setvar"osmode" 32767 )
  (setq p (getpoint "\nfirst blood"))
(command "pline" p "w" "30" "30" "@250<45"  "")
  (setq ps p)
  (setq pt (list p))
  (while p
    (setq p (getpoint "\nand then "))
(command "pline" p "w" "30" "30" "@250<45" "")
    (setq pt (append pt (list p)))
  )
  (setq pg (getpoint "\nsummary"))
  (setq n (length pt))
  (setq index 0)
  (repeat n
    (setq p1     (nth  index pt)
      index (1+ index)
      p2    (nth  index pt)
    )
    (command "line" p1 pg p2 pg"")
  )
(setq point_x1 (car ps))
(setq point_x2 (car pg))
(princ ps)
(princ point_x1)
(princ point_x2)
(if(> point_x2 point_x1)
(progn
(command "line" pg "@8000<0""")(command"-style""tssd" "" "1400" "" "" "" "" "")
(command"text" pg "0" "Nil:"))
(progn
(command "line" pg "@8000<180""")(command"-style""tssd" "" "1400" "" "" "" "" "")
(command"text" "j" "r" pg "0" "Nil:"))
)
(setvar "clayer" #k)
(setvar "osmode" #os)
  )
;;------------------------------------------------------------------------------------


运行出现:
and then  未知命令“W”。按 F1 查看帮助。
未知命令“30”。按 F1 查看帮助。
未知命令“30”。按 F1 查看帮助。
未知命令“@250<45”。按 F1 查看帮助。
请大神指导!


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

本版积分规则

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

GMT+8, 2025-5-20 08:25 , Processed in 0.168252 second(s), 26 queries , Gzip On.

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

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