blueshake 发表于 2022-7-6 10:19:02

获取多行文字的最大宽度。

我搜索论坛。然后在这个线程中获取代码。http://www.cadtutor.net/forum/showthread.php?35109-多行文字宽度&p=230733&viewfull=1#post230733
 
有些代码我不清楚。
如果我只想得到多行文字的最大宽度。我该怎么办??谢谢

Lt Dan's l 发表于 2022-7-6 10:42:38


(defun c:test (/ ent)
(while
   (not
   (and
       (setq ent (car (entsel "\nSelect mtext: ")))
       (eq "MTEXT" (cdr (assoc 0 (setq ent (entget ent)))))
   )
   )
   (prompt "\nMissed!! Try again!")
)
(prompt (rtos (cdr (assoc 41 ent)) 4 4))
(princ)
)

Guest kruuger 发表于 2022-7-6 10:56:47

http://kojacek.republika.pl/mtext.html
这是波兰网站,但你在底部有代码
克鲁格

Lee Mac 发表于 2022-7-6 11:16:22

恶心-我讨厌我的旧代码
 
这里有一个更好的惯例:
 
http://www.cadtutor.net/forum/showthread.php?52031-文本的起点和终点&p=352471&viewfull=1#post352471

blueshake 发表于 2022-7-6 11:20:32

非常感谢。全部的
@李·麦克
这是一个很酷的惯例。
页: [1]
查看完整版本: 获取多行文字的最大宽度。