autocrap 发表于 2022-7-6 10:01:48

享受

autocrap 发表于 2022-7-6 10:03:32

这是我修改的丹中尉的腿部程序。当我在使用程序时尝试输入管道尺寸时,我在下半部分遇到了问题。
(defun c:lf (/ p1 p2 di ang ins txt)
(setq p1 (getpoint "\nSpecify first point: "))
(setq p2 (getpoint p1 "\nSpecify second point: "))
(setq di (distance p1 p2))
(setq ang (angle p1 p2))
(setq ins (getpoint "\nSpecify text location: "))
(setq txt (strcat (rtos di 4 2) "' " (angtos ang)))
;or (setq txt (strcat (rtos di 4 2) (angtos ang)))
(entmake
   (list
    '(0 . "text")
   (cons 1 TXT)
   (cons 10 ins)
   (cons 11 ins)
   (cons 40 2.5)
   (cons 50 ang)
   (cons 72 1);replace 1 with 0 for text justification left
    )
   )
(princ)
)
 
请帮忙

autocrap 发表于 2022-7-6 10:08:07

使用getdist或getreal

Lee Mac 发表于 2022-7-6 10:10:15

 
享受它
 
塔瓦特

alanjt 发表于 2022-7-6 10:14:50

谢谢,非常有用。我很高兴这是一个简单的解决方案

autocrap 发表于 2022-7-6 10:16:22

 
我为你感到高兴,你得到了工作。
 
顺致敬意,
 
塔瓦特

alanjt 发表于 2022-7-6 10:19:43

Tharwat 发表于 2022-7-6 10:22:39

 
Enjoy it
 
Tharwat

autocrap 发表于 2022-7-6 10:28:00

thanks, very helpfull.I'm happy it was a simple solution

Tharwat 发表于 2022-7-6 10:29:19

 
I am happy for you that you got worked .
 
Best regards,
 
Tharwat
页: 1 [2]
查看完整版本: 使用autolisp标记