<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Sticky initget? Or getkword recognizing only the first initget call? in Visual LISP, AutoLISP and General Customization Forum</title>
    <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/sticky-initget-or-getkword-recognizing-only-the-first-initget/m-p/6411237#M131025</link>
    <description>&lt;P&gt;acadver = "20.0s (LMS Tech)"&lt;/P&gt;&lt;P&gt;Civil 3D 2015 service pack 3&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here's a simplified, color coded, line numbered command line sequence:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#FF9900"&gt;1 &amp;nbsp;&lt;/FONT&gt; Command: &lt;FONT color="#800000"&gt;(initget "Yes No")&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#3366FF"&gt;&lt;FONT color="#FF9900"&gt;2 &amp;nbsp;&lt;/FONT&gt; nil&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#FF9900"&gt;3 &amp;nbsp;&lt;/FONT&gt; Command: &lt;FONT color="#800000"&gt;(getkword "Yes or No? ")&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#3366FF"&gt;&lt;FONT color="#FF9900"&gt;4 &amp;nbsp;&lt;/FONT&gt; Yes or No?&lt;/FONT&gt; &lt;FONT color="#800000"&gt;y&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#3366FF"&gt;&lt;FONT color="#FF9900"&gt;5 &amp;nbsp;&lt;/FONT&gt; "Yes"&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#FF9900"&gt;6 &amp;nbsp;&lt;/FONT&gt; Command: &lt;FONT color="#800000"&gt;(initget "You Me")&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#3366FF"&gt;&lt;FONT color="#FF9900"&gt;7 &amp;nbsp;&lt;/FONT&gt; nil&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#FF9900"&gt;8 &amp;nbsp;&lt;/FONT&gt; Command: &lt;FONT color="#800000"&gt;(getkword "You or Me? ")&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#3366FF"&gt;&lt;FONT color="#FF9900"&gt;9 &amp;nbsp;&lt;/FONT&gt; You or Me?&lt;/FONT&gt; &lt;FONT color="#800000"&gt;you&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#3366FF"&gt;&lt;FONT color="#FF9900"&gt;10 &amp;nbsp;&lt;/FONT&gt;Invalid option keyword.&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#3366FF"&gt;&lt;FONT color="#FF9900"&gt;11 &amp;nbsp;&lt;/FONT&gt;You or Me?&lt;/FONT&gt; &lt;FONT color="#800000"&gt;me&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#3366FF"&gt;&lt;FONT color="#FF9900"&gt;12 &amp;nbsp;&lt;/FONT&gt;Invalid option keyword.&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#3366FF"&gt;&lt;FONT color="#FF9900"&gt;13 &amp;nbsp;&lt;/FONT&gt;You or Me? &lt;/FONT&gt;&lt;FONT color="#800000"&gt;no&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#3366FF"&gt;&lt;FONT color="#FF9900"&gt;14 &amp;nbsp;&lt;/FONT&gt;"No"&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#FF9900"&gt;15 &amp;nbsp;&lt;/FONT&gt;Command: &lt;FONT color="#800000"&gt;(getkword "You or Me? ")&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#3366FF"&gt;&lt;FONT color="#FF9900"&gt;16 &amp;nbsp;&lt;/FONT&gt;You or Me?&lt;/FONT&gt; &lt;FONT color="#800000"&gt;y&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#3366FF"&gt;&lt;FONT color="#FF9900"&gt;17 &amp;nbsp;&lt;/FONT&gt;"Yes"&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#000000"&gt;Maybe it's time to learn to use lambda...&lt;/FONT&gt;&lt;/P&gt;</description>
    <pubDate>Wed, 29 Jun 2016 17:56:02 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2016-06-29T17:56:02Z</dc:date>
    <item>
      <title>Sticky initget? Or getkword recognizing only the first initget call?</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/sticky-initget-or-getkword-recognizing-only-the-first-initget/m-p/6409452#M131019</link>
      <description>&lt;P&gt;Can anyone explain why the following is happening?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Command: (initget "Alpha Beta Gamma")&lt;BR /&gt;nil&lt;/P&gt;&lt;P&gt;Command: (getkword "\nChoose Alpha/Beta/Gamma: ")&lt;/P&gt;&lt;P&gt;Choose Alpha/Beta/Gamma: a&lt;BR /&gt;"Alpha"&lt;/P&gt;&lt;P&gt;Command: (initget "Apples Berries Cocoa")&lt;BR /&gt;nil&lt;/P&gt;&lt;P&gt;Command: (getkword "\nChoose Apples/Berries/Cocoa: ")&lt;/P&gt;&lt;P&gt;Choose Apples/Berries/Cocoa: a&lt;BR /&gt;"Alpha"&lt;/P&gt;&lt;P&gt;Command: (getkword "\nChoose Apples/Berries/Cocoa: ")&lt;/P&gt;&lt;P&gt;Choose Apples/Berries/Cocoa: b&lt;BR /&gt;"Beta"&lt;/P&gt;&lt;P&gt;Command: (getkword "\nChoose Apples/Berries/Cocoa: ")&lt;/P&gt;&lt;P&gt;Choose Apples/Berries/Cocoa: c&lt;/P&gt;&lt;P&gt;Invalid option keyword.&lt;/P&gt;&lt;P&gt;Choose Apples/Berries/Cocoa: g&lt;BR /&gt;"Gamma"&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Many thanks in advance,&lt;/P&gt;&lt;P&gt;David Field&lt;/P&gt;</description>
      <pubDate>Tue, 28 Jun 2016 22:12:31 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/sticky-initget-or-getkword-recognizing-only-the-first-initget/m-p/6409452#M131019</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2016-06-28T22:12:31Z</dc:date>
    </item>
    <item>
      <title>Re: Sticky initget? Or getkword recognizing only the first initget call?</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/sticky-initget-or-getkword-recognizing-only-the-first-initget/m-p/6409647#M131020</link>
      <description>&lt;P&gt;I copy/pasted code from another initget-related post&amp;nbsp;and it worked like I expected, so I thought maybe it had something to do with using three keywords, for some reason. Grasping at straws here...&lt;/P&gt;&lt;P&gt;So I tried it again in a new drawing, with just two keywords - same behavior.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Command:&lt;BR /&gt;Command:&lt;/P&gt;&lt;P&gt;Command:&lt;BR /&gt;Command: (initget "Yes No")&lt;BR /&gt;nil&lt;/P&gt;&lt;P&gt;Command: (setq ans (getkword "Yes or No? "))&lt;BR /&gt;Yes or No? y&lt;BR /&gt;"Yes"&lt;/P&gt;&lt;P&gt;Command: (setq ans (getkword "Yes or No? "))&lt;BR /&gt;Yes or No? n&lt;BR /&gt;"No"&lt;/P&gt;&lt;P&gt;Command: (setq ans (getkword "Yes or No? "))&lt;BR /&gt;Yes or No? y&lt;BR /&gt;"Yes"&lt;/P&gt;&lt;P&gt;Command: (setq ans (getkword "Yes or No? "))&lt;BR /&gt;Yes or No? you&lt;/P&gt;&lt;P&gt;Invalid option keyword.&lt;BR /&gt;Yes or No? noah&lt;/P&gt;&lt;P&gt;Invalid option keyword.&lt;BR /&gt;Yes or No? n&lt;BR /&gt;"No"&lt;/P&gt;&lt;P&gt;Command: (setq newans (getkword "You or Noah? "))&lt;BR /&gt;You or Noah? y&lt;BR /&gt;"Yes"&lt;/P&gt;&lt;P&gt;Command: (setq newans (getkword "You or Noah? "))&lt;BR /&gt;You or Noah? n&lt;BR /&gt;"No"&lt;/P&gt;&lt;P&gt;Command: (setq newans (getkword "You or Noah? "))&lt;BR /&gt;You or Noah? you&lt;/P&gt;&lt;P&gt;Invalid option keyword.&lt;BR /&gt;You or Noah? noah&lt;/P&gt;&lt;P&gt;Invalid option keyword.&lt;BR /&gt;You or Noah? y&lt;BR /&gt;"Yes"&lt;/P&gt;&lt;P&gt;Command: (initget "You Noah")&lt;BR /&gt;nil&lt;/P&gt;&lt;P&gt;Command: (setq newans (getkword "You or Noah? "))&lt;BR /&gt;You or Noah? y&lt;BR /&gt;"Yes"&lt;/P&gt;&lt;P&gt;Command: (setq newans (getkword "You or Noah? "))&lt;BR /&gt;You or Noah? noah&lt;/P&gt;&lt;P&gt;Invalid option keyword.&lt;BR /&gt;You or Noah? you&lt;/P&gt;&lt;P&gt;Invalid option keyword.&lt;BR /&gt;You or Noah? no&lt;BR /&gt;"No"&lt;/P&gt;&lt;P&gt;Command: (setq newans (getkword "You or Noah? "))&lt;BR /&gt;You or Noah? yes&lt;BR /&gt;"Yes"&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 29 Jun 2016 00:51:40 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/sticky-initget-or-getkword-recognizing-only-the-first-initget/m-p/6409647#M131020</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2016-06-29T00:51:40Z</dc:date>
    </item>
    <item>
      <title>Re: Sticky initget? Or getkword recognizing only the first initget call?</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/sticky-initget-or-getkword-recognizing-only-the-first-initget/m-p/6409741#M131021</link>
      <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Hi David&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The initget bit values and keywords apply only to the next user-input function call.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You seem to be missing a couple of initget(...)&amp;nbsp;statements&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Regards,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 29 Jun 2016 03:00:52 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/sticky-initget-or-getkword-recognizing-only-the-first-initget/m-p/6409741#M131021</guid>
      <dc:creator>kerry_w_brown</dc:creator>
      <dc:date>2016-06-29T03:00:52Z</dc:date>
    </item>
    <item>
      <title>Re: Sticky initget? Or getkword recognizing only the first initget call?</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/sticky-initget-or-getkword-recognizing-only-the-first-initget/m-p/6409803#M131022</link>
      <description>No, I don't think I am. Line 6 in the first example, I called (initget "Apples Berries Cocoa"), and in line 35 in the 2nd example, I called (initget "You Noah") after messing around with entering invalid keywords several times.</description>
      <pubDate>Wed, 29 Jun 2016 04:41:41 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/sticky-initget-or-getkword-recognizing-only-the-first-initget/m-p/6409803#M131022</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2016-06-29T04:41:41Z</dc:date>
    </item>
    <item>
      <title>Re: Sticky initget? Or getkword recognizing only the first initget call?</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/sticky-initget-or-getkword-recognizing-only-the-first-initget/m-p/6409863#M131023</link>
      <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Sorry, I can't reproduce your issue.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Which build are you working with ?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 29 Jun 2016 05:50:10 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/sticky-initget-or-getkword-recognizing-only-the-first-initget/m-p/6409863#M131023</guid>
      <dc:creator>kerry_w_brown</dc:creator>
      <dc:date>2016-06-29T05:50:10Z</dc:date>
    </item>
    <item>
      <title>Re: Sticky initget? Or getkword recognizing only the first initget call?</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/sticky-initget-or-getkword-recognizing-only-the-first-initget/m-p/6410052#M131024</link>
      <description>&lt;P&gt;I can reproduce this phenomenon if I execute line by line, from the command line, it's strange. . .&lt;BR /&gt;However in an encapsulated code, the problem does not reproduce.&lt;BR /&gt;Example:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;((lambda ( / l omega)
	(setq l '("Alpha Beta Gamma" "Apples Berries Cocoa" "Alan Bob Ghost" "Sumerians Egyptians Romans Mayans"))
	(setq omega (mapcar '(lambda (x) (initget x) (princ (getkword (strcat "\nChoose[" (vl-string-translate " " "/" x) "]: ")))) l))
	(print omega)
	(prin1)
))&lt;/PRE&gt;&lt;P&gt;The variable contains omega although the list of choices.&lt;/P&gt;</description>
      <pubDate>Wed, 29 Jun 2016 08:31:12 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/sticky-initget-or-getkword-recognizing-only-the-first-initget/m-p/6410052#M131024</guid>
      <dc:creator>CADaSchtroumpf</dc:creator>
      <dc:date>2016-06-29T08:31:12Z</dc:date>
    </item>
    <item>
      <title>Re: Sticky initget? Or getkword recognizing only the first initget call?</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/sticky-initget-or-getkword-recognizing-only-the-first-initget/m-p/6411237#M131025</link>
      <description>&lt;P&gt;acadver = "20.0s (LMS Tech)"&lt;/P&gt;&lt;P&gt;Civil 3D 2015 service pack 3&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here's a simplified, color coded, line numbered command line sequence:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#FF9900"&gt;1 &amp;nbsp;&lt;/FONT&gt; Command: &lt;FONT color="#800000"&gt;(initget "Yes No")&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#3366FF"&gt;&lt;FONT color="#FF9900"&gt;2 &amp;nbsp;&lt;/FONT&gt; nil&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#FF9900"&gt;3 &amp;nbsp;&lt;/FONT&gt; Command: &lt;FONT color="#800000"&gt;(getkword "Yes or No? ")&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#3366FF"&gt;&lt;FONT color="#FF9900"&gt;4 &amp;nbsp;&lt;/FONT&gt; Yes or No?&lt;/FONT&gt; &lt;FONT color="#800000"&gt;y&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#3366FF"&gt;&lt;FONT color="#FF9900"&gt;5 &amp;nbsp;&lt;/FONT&gt; "Yes"&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#FF9900"&gt;6 &amp;nbsp;&lt;/FONT&gt; Command: &lt;FONT color="#800000"&gt;(initget "You Me")&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#3366FF"&gt;&lt;FONT color="#FF9900"&gt;7 &amp;nbsp;&lt;/FONT&gt; nil&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#FF9900"&gt;8 &amp;nbsp;&lt;/FONT&gt; Command: &lt;FONT color="#800000"&gt;(getkword "You or Me? ")&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#3366FF"&gt;&lt;FONT color="#FF9900"&gt;9 &amp;nbsp;&lt;/FONT&gt; You or Me?&lt;/FONT&gt; &lt;FONT color="#800000"&gt;you&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#3366FF"&gt;&lt;FONT color="#FF9900"&gt;10 &amp;nbsp;&lt;/FONT&gt;Invalid option keyword.&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#3366FF"&gt;&lt;FONT color="#FF9900"&gt;11 &amp;nbsp;&lt;/FONT&gt;You or Me?&lt;/FONT&gt; &lt;FONT color="#800000"&gt;me&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#3366FF"&gt;&lt;FONT color="#FF9900"&gt;12 &amp;nbsp;&lt;/FONT&gt;Invalid option keyword.&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#3366FF"&gt;&lt;FONT color="#FF9900"&gt;13 &amp;nbsp;&lt;/FONT&gt;You or Me? &lt;/FONT&gt;&lt;FONT color="#800000"&gt;no&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#3366FF"&gt;&lt;FONT color="#FF9900"&gt;14 &amp;nbsp;&lt;/FONT&gt;"No"&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#FF9900"&gt;15 &amp;nbsp;&lt;/FONT&gt;Command: &lt;FONT color="#800000"&gt;(getkword "You or Me? ")&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#3366FF"&gt;&lt;FONT color="#FF9900"&gt;16 &amp;nbsp;&lt;/FONT&gt;You or Me?&lt;/FONT&gt; &lt;FONT color="#800000"&gt;y&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#3366FF"&gt;&lt;FONT color="#FF9900"&gt;17 &amp;nbsp;&lt;/FONT&gt;"Yes"&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#000000"&gt;Maybe it's time to learn to use lambda...&lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 29 Jun 2016 17:56:02 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/sticky-initget-or-getkword-recognizing-only-the-first-initget/m-p/6411237#M131025</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2016-06-29T17:56:02Z</dc:date>
    </item>
    <item>
      <title>Re: Sticky initget? Or getkword recognizing only the first initget call?</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/sticky-initget-or-getkword-recognizing-only-the-first-initget/m-p/6411391#M131026</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;@Anonymous wrote:&lt;BR /&gt;
&lt;P&gt;acadver = "20.0s (LMS Tech)"&lt;/P&gt;
&lt;P&gt;Civil 3D 2015 service pack 3&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Here's a simplified, color coded, line numbered command line sequence:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
...
&lt;P&gt;&lt;FONT color="#000000"&gt;Maybe it's time to learn to use lambda...&lt;/FONT&gt;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;It is failing where this is used in a code? Never to me!&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;If you use this is regular way... it never fails. Btw you should use a standardized format - then it's clickable.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;btw Can you reproduce this if you wrap these with (progn)?&amp;nbsp;&lt;/P&gt;
&lt;P&gt;(progn (initget "You Noah") (princ (getkword "\nYou or Noah? [You/Me]: ")))&lt;/P&gt;
&lt;P&gt;I can't.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-SPOILER&gt;
&lt;PRE&gt;(defun c:test ()

  (initget 1 "Yes No")
  (princ (getkword "\nYes or No? [Yes/No]: "))

  (initget "You Me")
  (princ (getkword "\nYou or Me? [You/Me]: "))

  (initget "You Noah")
  (princ (getkword "\nYou or Noah? [You/Me]: "))

  (initget "Apples Berries Cocoa")
  (princ (getkword "\nChoose [Apples/Berries/Cocoa]: "))

  (initget "Alpha Beta Gamma")
  (princ (getkword "\nChoose [Alpha/Beta/Gamma]: "))

  (princ)
)&lt;/PRE&gt;
&lt;/LI-SPOILER&gt;
&lt;LI-SPOILER&gt;
&lt;PRE&gt;Command: TEST

Yes or No? [Yes/No]: y
Yes
You or Me? [You/Me]: y
You
You or Noah? [You/Me]: y
You
Choose [Apples/Berries/Cocoa]: a
Apples
Choose [Alpha/Beta/Gamma]: a
Alpha

Command:
Command:
TEST

Yes or No? [Yes/No]: y
Yes
You or Me? [You/Me]: m
Me
You or Noah? [You/Me]: m

Invalid option keyword.

You or Noah? [You/Me]: n
Noah
Choose [Apples/Berries/Cocoa]: c
Cocoa
Choose [Alpha/Beta/Gamma]: g
Gamma

Command:
Command:
TEST

Yes or No? [Yes/No]: n
No
You or Me? [You/Me]: me
Me
You or Noah? [You/Me]: you
You
Choose [Apples/Berries/Cocoa]: cocoa
Cocoa
Choose [Alpha/Beta/Gamma]: b
Beta

Command:&lt;/PRE&gt;
&lt;/LI-SPOILER&gt;
&lt;P&gt;No need for lambda on regular basis. As&amp;nbsp;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/524107"&gt;@CADaSchtroumpf&lt;/a&gt;&amp;nbsp;said:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;I &lt;STRONG&gt;can reproduce this phenomenon&lt;/STRONG&gt; if I execute line by line, &lt;STRONG&gt;from the command line&lt;/STRONG&gt;, it's strange. . .&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;However &lt;STRONG&gt;in an encapsulated code, the problem does not reproduce.&lt;/STRONG&gt;&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 29 Jun 2016 19:09:54 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/sticky-initget-or-getkword-recognizing-only-the-first-initget/m-p/6411391#M131026</guid>
      <dc:creator>ВeekeeCZ</dc:creator>
      <dc:date>2016-06-29T19:09:54Z</dc:date>
    </item>
    <item>
      <title>Re: Sticky initget? Or getkword recognizing only the first initget call?</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/sticky-initget-or-getkword-recognizing-only-the-first-initget/m-p/6411517#M131027</link>
      <description>&lt;P&gt;No, I'm in the habit of pasting each line of code to the command line as I write to make sure it works on its own. This is the first time I've run into a function that doesn't work that way.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;You're right though, it works fine wrapped in a progn. From what you say it should also work fine when I run the finished routine, but I'll make a note of using progn just in case.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Still confused by the fact this doesn't work if entered line by line at the command line, but okay, I can accept it just doesn't.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks all!&lt;/P&gt;</description>
      <pubDate>Wed, 29 Jun 2016 20:16:59 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/sticky-initget-or-getkword-recognizing-only-the-first-initget/m-p/6411517#M131027</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2016-06-29T20:16:59Z</dc:date>
    </item>
    <item>
      <title>Re: Sticky initget? Or getkword recognizing only the first initget call?</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/sticky-initget-or-getkword-recognizing-only-the-first-initget/m-p/6411527#M131028</link>
      <description>&lt;P&gt;By the way, what did you mean by a standardized format?&lt;/P&gt;</description>
      <pubDate>Wed, 29 Jun 2016 20:20:17 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/sticky-initget-or-getkword-recognizing-only-the-first-initget/m-p/6411527#M131028</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2016-06-29T20:20:17Z</dc:date>
    </item>
    <item>
      <title>Re: Sticky initget? Or getkword recognizing only the first initget call?</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/sticky-initget-or-getkword-recognizing-only-the-first-initget/m-p/6411556#M131029</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;@Anonymous wrote:&lt;BR /&gt;
&lt;P&gt;By the way, what did you mean by a standardized format?&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;PRE&gt;(getkword "\nChoose &lt;FONT color="#FF0000"&gt;&lt;STRONG&gt;[&lt;/STRONG&gt;&lt;/FONT&gt;Alpha&lt;FONT color="#FF0000"&gt;&lt;STRONG&gt;/&lt;/STRONG&gt;&lt;/FONT&gt;Beta&lt;FONT color="#FF0000"&gt;&lt;STRONG&gt;/&lt;/STRONG&gt;&lt;/FONT&gt;Gamma&lt;FONT color="#FF0000"&gt;&lt;STRONG&gt;]&lt;/STRONG&gt;&lt;/FONT&gt;: ")
;&lt;BR /&gt;; or if there is a default option:&lt;BR /&gt;;
(getkword "\nChoose &lt;STRONG&gt;&lt;FONT color="#FF0000"&gt;[&lt;/FONT&gt;&lt;/STRONG&gt;Alpha&lt;STRONG&gt;&lt;FONT color="#FF0000"&gt;/&lt;/FONT&gt;&lt;/STRONG&gt;Beta&lt;FONT color="#FF0000"&gt;&lt;STRONG&gt;/&lt;/STRONG&gt;&lt;/FONT&gt;Gamma&lt;STRONG&gt;&lt;FONT color="#FF0000"&gt;]&lt;/FONT&gt; &lt;FONT color="#FF0000"&gt;&amp;lt;&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT color="#000000"&gt;Beta&lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT color="#FF0000"&gt;&amp;gt;&lt;/FONT&gt;&lt;/STRONG&gt;: ")&lt;/PRE&gt;</description>
      <pubDate>Wed, 29 Jun 2016 20:31:58 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/sticky-initget-or-getkword-recognizing-only-the-first-initget/m-p/6411556#M131029</guid>
      <dc:creator>ВeekeeCZ</dc:creator>
      <dc:date>2016-06-29T20:31:58Z</dc:date>
    </item>
    <item>
      <title>Re: Sticky initget? Or getkword recognizing only the first initget call?</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/sticky-initget-or-getkword-recognizing-only-the-first-initget/m-p/6411585#M131030</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;@Anonymous wrote:&lt;BR /&gt;
&lt;P&gt;No, I'm in the habit of pasting each line of code to the command line as I write to make sure it works on its own....&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Frankly... if there is a rule, that certain&amp;nbsp;command works just for the&amp;nbsp;following function... it's suspicious to me - not automatical expecting that it works in command line as well. This applies for (initget) or (initcommandversion)... Just caution -- but it should work &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt; Maybe when&amp;nbsp;a delay is too long, it does not.&lt;/P&gt;</description>
      <pubDate>Wed, 29 Jun 2016 20:48:39 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/sticky-initget-or-getkword-recognizing-only-the-first-initget/m-p/6411585#M131030</guid>
      <dc:creator>ВeekeeCZ</dc:creator>
      <dc:date>2016-06-29T20:48:39Z</dc:date>
    </item>
  </channel>
</rss>

