guitarguy1685 Posted June 7, 2017 Posted June 7, 2017 when you type "L" in the command line, the next line reads "LINE", then before the user input prompt "LINE" is displayed in bold. See image for a better explanation. Is it possible to get autolisps to behave the same way? If I have a program called by the function "MyLISP", and then I use the shortcut via my pgp file "ML", it does not behave like a native ACAD command. When I use the shorcut "L" autocad reminds me the full command is "LINE" My command prompt is not prefixed with AutoLisp name. When I use the shortcut ACAD just reprints the shortcut before going to the user input. It's a small thing, but it bugs me Quote
halam Posted June 7, 2017 Posted June 7, 2017 Many things are possible but I don't quite understand why you begin with a ssget call when you want to draw lines Start with something like this.. e.g. my ongoing single line routine. (defun msl (/ CMDECHO CMDDIA FRAD E1 UCSE1 E2 UCSE2 osmo) (princ "\nMultiple single lines") (setq laynu (getvar "clayer")) (command "-layer" "on" laynu "") ;(setq osmo (getvar "Osmode")) ;(setvar "Osmode" 0) (setvar "Cmdecho" 0) (setq ERR *ERROR* *ERROR* LISP-ERR CMDECHO 0 CMDDIA 0 E1 nil E2 nil ) (setq E1 (getpoint "\nfrom point")) (SETQ UCSE1 (TRANS E1 1 0)) (while (/= E1 nil) (setq E2 (getpoint E1 "\tsecond point: ")) (SETQ UCSE2 (TRANS E2 1 0)) (entmake (list '(0 . "LINE") (cons 10 UCSE1) ;start (cons 11 UCSE2) ;end ) ) (princ "\nMultiple single lines") (setq E1 (getpoint "\nfirst: ")) (SETQ UCSE1 (TRANS E1 1 0)) ) ;_end of while (setvar "Cmdecho" 1) ;(setvar "Osmode" osmo) (princ) ) (defun C:n () (msl)) ;|«Visual LISP© Format Options» (80 4 50 2 nil "end of " 80 50 0 0 2 nil nil nil T) ;*** DO NOT add text below the comment! ***|; Quote
guitarguy1685 Posted June 8, 2017 Author Posted June 8, 2017 Many things are possible but I don't quite understand why you begin with a ssget call when you want to draw lines I was just using "LINE" as an example. It could be erase, move, circle, any native ACAD command. With a native ACAD command, when you type the Shortcut ("L" in my example), the next line iterates the full name of the command The next line after starts with an Icon, then the Full name in Bold, followed by whatever prompts come next. Autolisps do not behave the same way. Quote
BIGAL Posted June 8, 2017 Posted June 8, 2017 Just use something like this (princ "\nMSL") Where I want the end user to read something rather than rely on the command line prompt I use (alert "message") Quote
tombu Posted June 8, 2017 Posted June 8, 2017 I was just using "LINE" as an example. It could be erase, move, circle, any native ACAD command. With a native ACAD command, when you type the Shortcut ("L" in my example), the next line iterates the full name of the command The next line after starts with an Icon, then the Full name in Bold, followed by whatever prompts come next. Autolisps do not behave the same way. Works fine for me, have you scrolled down the list to look for your lisp command name? The lisp would have to be loaded for Autocomplete to find it. You can set it to either "Alphabetically" or "According to frequency of useage". Quote
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.