TheSwamp

Code Red => AutoLISP (Vanilla / Visual) => Topic started by: ozimad on February 18, 2010, 04:24:17 AM

Title: Autolisp function menu
Post by: ozimad on February 18, 2010, 04:24:17 AM
Hi is it possible to get in lisp the menu like in pedit command? see atach.
Thanks a lot!
Title: Re: Autolisp function menu
Post by: Kerry on February 18, 2010, 05:05:38 AM
yep the [ ... ] does the trick
Code: [Select]
 (initget "Left Right Up Down Sideways Insideout Forwatd Backwards")
  (setq direction
         (getkword
           "\nElbow direction [Left/Right/Up/Down/Sideways/Insideout/Forward/Backwards ] <Right>: "
         )
  )
 


[edit] this is what it looks like :
Title: Re: Autolisp function menu
Post by: Kerry on February 18, 2010, 05:20:36 AM

addendum:

to have the prompt display ( as per your picture)
you will need the
DYNMODE variable set to 1, 2, or 3
and
DYNPROMPT variable set to 1
Title: Re: Autolisp function menu
Post by: dgorsman on February 18, 2010, 02:11:53 PM
An addendum to the addendum - options go in the square brackets, separated by slashes.  The default selection goes in the angled brackets at the end.  There is an upper limit, somewhere around 20 items or so.  Not that its actually useable at that point.   :wink:
Title: Re: Autolisp function menu
Post by: rhino on February 19, 2010, 11:24:18 AM
whats the limit to the length of that list?
Title: Re: Autolisp function menu
Post by: ozimad on February 22, 2010, 02:35:22 AM
Thanks it works!
Title: Re: Autolisp function menu
Post by: Kerry on February 22, 2010, 05:55:02 PM

I'm pleased I could help.
Title: Re: Autolisp function menu
Post by: ozimad on February 23, 2010, 02:12:51 AM
Some more stupid questiions from me. I think this can feet this topic also. How do i can get the same menu like in polyline command. When it is promts for new point or [arc/halwidth/lenght/.......]???
Title: Re: Autolisp function menu
Post by: Kerry on February 23, 2010, 02:21:30 AM

DYNMODE set to 1 ( or 2 or 3)
press Arrow-Down will get the prompt when in the PLINE command.
Title: Re: Autolisp function menu
Post by: ozimad on February 23, 2010, 02:59:10 AM
Yes, but i need to create my lisp with such ability to change setting during promt. For example select objets or [One/Two/Three].