KRBeckman 发表于 2022-7-6 11:45:25

多行文字AutoLisp问题

我有点不好意思发布这篇文章,但我花了很长时间创建一个lisp,它将以我想要的方式创建多行文字实体,在我想要的地方。。。它所放置的位置从来都不一致。
 
以下是我得到的:
 
(defun C:dt()
(setq caps_on   (getstring "\nPlease varify that the Caps Lock is on<Y>"))
(setq note_text (getstring T "\nPlease input what you would like the note to say:"))
(setq note      (strcat "NOTE: " note_text))
(command "-mtext" '(0.05 1.117 0.0) "j" "BL" "s" "romans" "W" "3" note "")
(command "chprop" "l" "" "la" "A-Anno-Dims" "C" "GREEN" "")
)
 
 
救命!!

Lee Mac 发表于 2022-7-6 11:57:34


(defun c:mtxt(/ str)

(setq str (getstring t "\nMText String: "))

(entmakex (list (cons 0 "MTEXT")
               (cons 100 "AcDbEntity")
               (cons 100 "AcDbMText")
               (cons 8 "A-Anno-Dims")
               (cons 62 3)
               (cons 10 '(0.05 1.117 0.0))               
               (cons 7 "romans")
               (cons 1 (strcat "NOTE: " str))
               (cons 41 3)
               (cons 71 7)))

(princ))

lpseifert 发表于 2022-7-6 12:08:18

当然都是大写字母

(setq str (strcase(getstring t "\nMText String: ")))


KRBeckman 发表于 2022-7-6 12:18:41

是的,这将是我的下一个问题。。。谢谢你们俩!

KRBeckman 发表于 2022-7-6 12:20:50

还有一件事,我认为我很擅长这件事。。。为了改变多行文字实体的文字高度,我会在cons后面加什么?更好的是。。。我在哪里可以找到那个号码?
 
再次感谢。

KRBeckman 发表于 2022-7-6 12:36:46

没关系,在Visual Lisp编辑器帮助中找到了它。我发誓我在发帖之前看过了

Lee Mac 发表于 2022-7-6 12:43:14

这可能会帮助您:
http://autodesk.com/techpubs/autocad/acad2000/dxf/

KRBeckman 发表于 2022-7-6 12:52:15

是的,这是我现在最喜欢的。非常感谢你的帮助。
页: [1]
查看完整版本: 多行文字AutoLisp问题