Author Topic: Autolisp function menu  (Read 2414 times)

0 Members and 1 Guest are viewing this topic.

ozimad

  • Guest
Autolisp function menu
« 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!

Kerry

  • Mesozoic relic
  • Seagull
  • Posts: 11654
  • class keyThumper<T>:ILazy<T>
Re: Autolisp function menu
« Reply #1 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 :
« Last Edit: February 18, 2010, 05:47:32 AM by Kerry Brown »
kdub, kdub_nz in other timelines.
Perfection is not optional.
Everything will work just as you expect it to, unless your expectations are incorrect.
Discipline: None at all.

Kerry

  • Mesozoic relic
  • Seagull
  • Posts: 11654
  • class keyThumper<T>:ILazy<T>
Re: Autolisp function menu
« Reply #2 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
kdub, kdub_nz in other timelines.
Perfection is not optional.
Everything will work just as you expect it to, unless your expectations are incorrect.
Discipline: None at all.

dgorsman

  • Water Moccasin
  • Posts: 2437
Re: Autolisp function menu
« Reply #3 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:
If you are going to fly by the seat of your pants, expect friction burns.

try {GreatPower;}
   catch (notResponsible)
      {NextTime(PlanAhead);}
   finally
      {MasterBasics;}

rhino

  • Guest
Re: Autolisp function menu
« Reply #4 on: February 19, 2010, 11:24:18 AM »
whats the limit to the length of that list?

ozimad

  • Guest
Re: Autolisp function menu
« Reply #5 on: February 22, 2010, 02:35:22 AM »
Thanks it works!

Kerry

  • Mesozoic relic
  • Seagull
  • Posts: 11654
  • class keyThumper<T>:ILazy<T>
Re: Autolisp function menu
« Reply #6 on: February 22, 2010, 05:55:02 PM »

I'm pleased I could help.
kdub, kdub_nz in other timelines.
Perfection is not optional.
Everything will work just as you expect it to, unless your expectations are incorrect.
Discipline: None at all.

ozimad

  • Guest
Re: Autolisp function menu
« Reply #7 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/.......]???

Kerry

  • Mesozoic relic
  • Seagull
  • Posts: 11654
  • class keyThumper<T>:ILazy<T>
Re: Autolisp function menu
« Reply #8 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.
kdub, kdub_nz in other timelines.
Perfection is not optional.
Everything will work just as you expect it to, unless your expectations are incorrect.
Discipline: None at all.

ozimad

  • Guest
Re: Autolisp function menu
« Reply #9 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].