我假设explode选项对您有效,但如果不起作用,我决定尝试一下。这可能并不优雅,但我相信它可以帮助你开始。我只测试了一点点。我对这些评论有点过火,但我想这不会有什么害处。
- ;MLeaderTest
- (defun c:mltest ( / ss i e p1 height angle contents )
- (setq ss (ssget '(( 0 . "MULTILEADER" )))) ;get selection of multileaders
- (setq i 0) ;set loop index
- (repeat (sslength ss) ;loop through each selected entity
- (setq e (ssname ss i)) ;get current entity
- (setq p1 (cdr (assoc 110 (entget e)))) ;set p1 to the point coordinates that the leader is pointing to
- (setq height (cdr (assoc 41 (entget e)))) ;set text height
- (setq angle 0) ;this defaults the rotation angle to be 0
- (setq contents (cdr (assoc 304 (entget e)))) ;get text contents
- (command "text" p1 height angle contents) ;create a new text object based on gathered info
- (command "erase" e "") ;erase Mleader entity
- (setq i (1+ i)) ;increment index
- )
- (princ)
- )
|