明经CAD社区

 找回密码
 注册

QQ登录

只需一步,快速开始

搜索
12
返回列表 发新帖
楼主: 852456

[提问] 命令嵌套深度不能超过四层

[复制链接]
发表于 2018-11-9 17:36:10 | 显示全部楼层
(command "DJF3" "0.2" p1 p2 "")    lisp里面调用cass命令就会这样
发表于 2018-11-9 20:30:41 | 显示全部楼层
  1. (defun c:tt ()
  2.   (while (and (setq p1 (getpoint "\n指定第一点: "))
  3.               (setq p2 (getpoint p1 "\n指定第二点: "))
  4.               (setq p3 (getpoint p2 "\n指定第三点: "))
  5.          )
  6.     (command "pline" p1 "w" "0.2" "" p2 "")
  7.     (command "offset" "4" (entlast) p3 "")
  8.     (setq s1 (entlast)
  9.           p3 (vlax-curve-getEndPoint s1)
  10.           p4 (vlax-curve-getStartPoint s1)
  11.           pt (inters p1 p3 p2 p4)
  12.     )
  13.     (entmake (list '(0 . "TEXT")
  14.                    (cons 1 "道路")
  15.                    (cons 10 pt)
  16.                    (cons 40 1.5)
  17.                    (cons 41 1)
  18.                    (cons 7 "HZDX")
  19.                    (cons 8 "TK")
  20.                    (cons 71 0)
  21.                    (cons 72 1)
  22.                    (cons 73 2)
  23.                    (cons 11 pt)
  24.              )
  25.     )
  26.   )
  27.   (princ)
  28. )
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2025-5-19 09:38 , Processed in 0.151707 second(s), 20 queries , Gzip On.

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

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