anishtain4 Posted August 7, 2012 Share Posted August 7, 2012 I need a lisp to use DT command in a way that when the user press the enter no new line get started and command ends, how should I do it? absolutely no idea Quote Link to comment Share on other sites More sharing options...
anishtain4 Posted August 7, 2012 Author Share Posted August 7, 2012 never mind, got it. I should make the user press enter twice Quote Link to comment Share on other sites More sharing options...
CALCAD Posted August 8, 2012 Share Posted August 8, 2012 In case you may still be interested, here is a program to do what you asked for. (defun Text (pt hgt str) (entmakex (list (cons 0 "TEXT") (cons 10 pt) (cons 11 pt) (cons 40 hgt) (cons 72 0) ; lower left justified (cons 1 str))) ) (defun c:dtxx (/ *ERROR* osave c txtstr txtsz) (defun *ERROR* (msg) (setvar "OSMODE" osave) (princ) ) (setq osave (getvar "OSMODE")) (setvar "OSMODE" 0) (setq txtsz (getvar "TEXTSIZE")) (setq c (getpoint "\nSelect location: ")) (initget 129) (setq txtstr (getstring T "\nText: ")) (terpri) (terpri) (Text c txtsz txtstr) (setvar "OSMODE" osave) (princ) ) The rotation angle is the default (zero) and the current text size is used. You could, of course, add code to get these values from the user. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.