<?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: Using initget twice in Visual LISP, AutoLISP and General Customization Forum</title>
    <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/using-initget-twice/m-p/12798329#M13466</link>
    <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/13503176"&gt;@My_Civil_3D&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;&lt;LI-CODE lang="general"&gt;....
	));End Condition&lt;/LI-CODE&gt;&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;That last right parenthesis you have ends only the "is-it-450" condition.&amp;nbsp; For this snippet to be whole, you still need another&lt;FONT face="courier new,courier"&gt;&lt;STRONG&gt;&lt;FONT color="#000000"&gt; )&lt;/FONT&gt; &lt;/STRONG&gt;&lt;/FONT&gt;to conclude the surrounding&lt;FONT face="courier new,courier"&gt;&lt;STRONG&gt;&lt;FONT color="#000000"&gt; (cond)&lt;/FONT&gt; &lt;/STRONG&gt;&lt;/FONT&gt;function [which surely contains additional conditions for the other answers].&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If I add the final&lt;FONT face="courier new,courier"&gt;&lt;STRONG&gt;&lt;FONT color="#000000"&gt; )&lt;/FONT&gt; &lt;/STRONG&gt;&lt;/FONT&gt;, it works for me as expected.&amp;nbsp; So a too-many-arguments error isn't from the multiple&lt;FONT face="courier new,courier"&gt;&lt;STRONG&gt;&lt;FONT color="#000000"&gt; (initget)&lt;/FONT&gt; &lt;/STRONG&gt;&lt;/FONT&gt;functions.&amp;nbsp; I'm not sure where it could be coming from, unless it's in something further down the road in the larger routine.&lt;/P&gt;</description>
    <pubDate>Sun, 26 May 2024 11:28:50 GMT</pubDate>
    <dc:creator>Kent1Cooper</dc:creator>
    <dc:date>2024-05-26T11:28:50Z</dc:date>
    <item>
      <title>Using initget twice</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/using-initget-twice/m-p/12798280#M13465</link>
      <description>&lt;P&gt;Hi guys i am stuck with some code&lt;BR /&gt;i want the user to select a option and based on the result of that option select another option. i am getting an error saying to many arguments.&amp;nbsp; think the issue here is that i am incorrectly using the initget twice. here is a snip of my code.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;LI-CODE lang="general"&gt;(initget "450 600 750 900 1200 1500 1800 2100 2400 3000 3600")
(setq ans (getkword "\nSelect Span [450/600/750/900/1200/1500/1800/2100/2400/3000/3600]: "))
;Condition for 450
(cond ((= ans "450")
		(setq culvertclass "200S")
		(initget "450x300 450x375 450x450")
		(setq ans2 (getkword "\nSelect Culvert Size [450x300/450x375/450x450]: "))
			(cond 	((= ans2 "450x300")
						(setq culvertsize "450 x 300"))
					((= ans2 "450x375")
						(setq culvertsize "450 x 375"))
					((= ans2 "450x450")
						(setq culvertsize "450 x 450"))
			));End Condition&lt;/LI-CODE&gt;</description>
      <pubDate>Sun, 26 May 2024 10:55:48 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/using-initget-twice/m-p/12798280#M13465</guid>
      <dc:creator>My_Civil_3D</dc:creator>
      <dc:date>2024-05-26T10:55:48Z</dc:date>
    </item>
    <item>
      <title>Re: Using initget twice</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/using-initget-twice/m-p/12798329#M13466</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/13503176"&gt;@My_Civil_3D&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;&lt;LI-CODE lang="general"&gt;....
	));End Condition&lt;/LI-CODE&gt;&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;That last right parenthesis you have ends only the "is-it-450" condition.&amp;nbsp; For this snippet to be whole, you still need another&lt;FONT face="courier new,courier"&gt;&lt;STRONG&gt;&lt;FONT color="#000000"&gt; )&lt;/FONT&gt; &lt;/STRONG&gt;&lt;/FONT&gt;to conclude the surrounding&lt;FONT face="courier new,courier"&gt;&lt;STRONG&gt;&lt;FONT color="#000000"&gt; (cond)&lt;/FONT&gt; &lt;/STRONG&gt;&lt;/FONT&gt;function [which surely contains additional conditions for the other answers].&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If I add the final&lt;FONT face="courier new,courier"&gt;&lt;STRONG&gt;&lt;FONT color="#000000"&gt; )&lt;/FONT&gt; &lt;/STRONG&gt;&lt;/FONT&gt;, it works for me as expected.&amp;nbsp; So a too-many-arguments error isn't from the multiple&lt;FONT face="courier new,courier"&gt;&lt;STRONG&gt;&lt;FONT color="#000000"&gt; (initget)&lt;/FONT&gt; &lt;/STRONG&gt;&lt;/FONT&gt;functions.&amp;nbsp; I'm not sure where it could be coming from, unless it's in something further down the road in the larger routine.&lt;/P&gt;</description>
      <pubDate>Sun, 26 May 2024 11:28:50 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/using-initget-twice/m-p/12798329#M13466</guid>
      <dc:creator>Kent1Cooper</dc:creator>
      <dc:date>2024-05-26T11:28:50Z</dc:date>
    </item>
    <item>
      <title>Re: Using initget twice</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/using-initget-twice/m-p/12798557#M13467</link>
      <description>&lt;P&gt;FYI since you have so many initget options, instead of rewriting it again under getkword just let lisp do it for you like this&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="general"&gt;(vl-load-com)
(initget (setq msg "450 600 750 900 1200 1500 1800 2100 2400 3000 3600"))
(setq ans (getkword (strcat"\nSelect Span [" (vl-string-translate " " "/" msg)"]: ")))&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 26 May 2024 15:07:17 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/using-initget-twice/m-p/12798557#M13467</guid>
      <dc:creator>paullimapa</dc:creator>
      <dc:date>2024-05-26T15:07:17Z</dc:date>
    </item>
    <item>
      <title>Re: Using initget twice</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/using-initget-twice/m-p/12798568#M13468</link>
      <description>&lt;P&gt;Regards&amp;nbsp;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/13503176"&gt;@My_Civil_3D&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;For me it works well, with this test...&lt;/P&gt;
&lt;LI-CODE lang="general"&gt;(defun c:cs( / ans ans2 culvertsize)
(initget "450 600 750 900 1200 1500 1800 2100 2400 3000 3600")
(setq ans (getkword "\nSelect Span [450/600/750/900/1200/1500/1800/2100/2400/3000/3600]: "))
;Condition for 450
(cond ((= ans "450")
;;;		(setq culvertclass "200S");????
		(initget "450x300 450x375 450x450")
		(setq ans2 (getkword "\nSelect Culvert Size [450x300/450x375/450x450]: "))
			(cond 	((= ans2 "450x300")
						(setq culvertsize "450 x 300"))
					((= ans2 "450x375")
						(setq culvertsize "450 x 375"))
					((= ans2 "450x450")
						(setq culvertsize "450 x 450"))
                                 (t nil)
			);End Condition 2
       )
      (t nil)
      );End Condition
  (princ culvertsize)
  (princ)
  )&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 26 May 2024 15:20:07 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/using-initget-twice/m-p/12798568#M13468</guid>
      <dc:creator>calderg1000</dc:creator>
      <dc:date>2024-05-26T15:20:07Z</dc:date>
    </item>
    <item>
      <title>Re: Using initget twice</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/using-initget-twice/m-p/12799013#M13469</link>
      <description>&lt;P&gt;Have a look at this a dcl instead of initget.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="general"&gt;(if (not ah:buttscol)(load "Multi Radio buttons 2col.lsp"))
(if (= ah:but nil)(setq ah:but 1))
(if (= ah:but2 nil)(setq ah:but2 1))
(setq lst1 (list "Select size 1" "450" "600" "750" "900" "1200" "1500" "1800" "2100" "2400" "3000" "3600"))
(setq lst2 (list "Select size 2" "450" "600" "750" "900" "1200" "1500" "1800" "2100" "2400" "3000" "3600"))
(ah:buttscol ah:but ah:but2 "Please choose sizes" lst1 lst2)
(setq ans2 (strcat  (nth ah:2col lst1) "x" (nth ah:2col2 lst2)))&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="SeaHaven_0-1716770977171.png" style="width: 600px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1367591iC754410760BFF708/image-size/medium?v=v2&amp;amp;px=400" role="button" title="SeaHaven_0-1716770977171.png" alt="SeaHaven_0-1716770977171.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Make sure Multi radio butons 2col.lsp is in a search path.&lt;/P&gt;</description>
      <pubDate>Mon, 27 May 2024 00:51:06 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/using-initget-twice/m-p/12799013#M13469</guid>
      <dc:creator>Sea-Haven</dc:creator>
      <dc:date>2024-05-27T00:51:06Z</dc:date>
    </item>
  </channel>
</rss>

