我首先把代码分解成defuns,你的ssget基本上可以得到任何东西,然后在其他人忽略的对象类型TEXT、MTEXT或Blocks上使用cond。这样,您只需使用1个defun,而不是一个mega IF。同样,一个单独的defun,一旦你有了文本字符串,就会被调用,它有一系列的条件1/8 1/4 3/8 1/2等,并设置正确的多行文字字符串。我想说的是,你可以在defuns中调用defuns。
- defun change text
- defun ssget stuff
- defun what is it
- defun text option convert to mtext, defun change text
- defun mtext get value, defun change text
- defun insert get attributes, defun change text
- program starts here
|