TCEBob
Guest
|
Posted:
Sun Jan 02, 2005 5:11 am Post subject:
Script within Lisp? |
|
|
The following works:
(defun c:tmb( / ) ;textmask (to be made into an anonymous block -- thus
;stabilizing it so the text remains visible.)
(while (= sset nil) ;either just started or selection is not as specified.
(setq sset
(ssget ":S" '((-4 . "<OR") ;make a selection set of only one object
(0 . "TEXT")
(0 . "MTEXT")
(0 . "DIMENSION")
(-4 . "OR>"))
) ;ssget
) ;setq
) ;while
(command "copy" sset "" '(0 0) '(0 0) ;command ;duplicate it
"erase" sset "" ;remove original, leaving new set as "L"
"script" "tmsk" ;tmsk.scr must reside on the search path
) ;command ;this will mask the selected item.
;; more to come . . .
(princ))
;|
contents of tmsk.scr
;run textmask
TEXTMASK
;you have created the text object as Last
"l"
;blank lines for enter enter
;end - the following blank line is required
|;
However, I really hate to depend on scripts. Can the same be done within vlisp?
Tried Command and Vl-cmdf without much luck. Maybe I could write out the script
as a file or check for it, so I know it's in a findable location.
rs
|
|