您需要记住,函数不会在字符串文字中求值,因此需要strcat来连接字符串:
(defun c:davitcal (/ z w l s)
(setq Z (getreal "Enter pipe section modulus:"))
(setq W (getreal "Enter est. dead weight (FLG. + parts):"))
(setq L (getreal "Enter length of moment arm:"))
(setq S (getreal "Enter stress value for davit arm:"))
(entmake
(list
(cons 0 "MTEXT") ;; Entity Name
(cons 100 "AcDbEntity") ;; Subclass Marker
(cons 410 "Model") ;; Space
(cons 8 "0") ;; Layer
(cons 100 "AcDbMText") ;; Subclass Marker
(cons 10 '(5.0 3.0 0)) ;; Insertion Point
(cons 40 0.1) ;; Text Height
(cons 71 5) ;; Attachment Point (Mid-Cent)
(cons 1 (strcat "Z="(rtos Z)"IN\\PW="(rtos W)"#\\PL="(rtos L)"IN\\PS="(rtos S)"PSI")) ;; Text Content
(cons 7 "STANDARD"))) ;; Text Style
(princ))
伙计,你就是那个男人!!!!!!!!谢谢你我得到了我想要的我相信我很快会再次拜访你 很乐意帮助mate 李,我的朋友,日常工作做得很好。我还加了一些东西。我冒险偏离了航线,又迷路了。先生,您介意看一下吗。
6
它不会吐出多行文字。如果setq d=6“S/80管道,则应为:
6“S/80管道足够
请告诉我哪里出了问题? 变量“D”不是数字,而是字符串,因此不需要RTO:
7 谢谢你 没问题
页:
1
[2]