Script within Lisp?
CADForums.net Forum Index CADForums.net
Discussion of AutoCAD and other CAD software.
 
 FAQFAQ   MemberlistMemberlist     RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
 
Google
 
Web cadforums.net
Script within Lisp?

 
Post new topic   Reply to topic    CADForums.net Forum Index -> Customization
Author Message
TCEBob
Guest





Posted: Sun Jan 02, 2005 5:11 am    Post subject: Script within Lisp? Reply with quote

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

Back to top
 
Post new topic   Reply to topic    CADForums.net Forum Index -> Customization All times are GMT
Page 1 of 1

 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum




Windows Server DSP VoIP Electronics New Topics
Powered by phpBB