<?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: Resusing variables without having to set their value again in Visual LISP, AutoLISP and General Customization Forum</title>
    <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/resusing-variables-without-having-to-set-their-value-again/m-p/6514227#M129420</link>
    <description>&lt;P&gt;So if I used;&lt;/P&gt;&lt;PRE&gt; (defun c:WSH( / sset );Write Spot Height
 (or ( sc1 sc2 th)
		(setq sc1 (getreal "\n* Enter Plot Scale : "))
		(setq sc2 (* (/ sc1 200) 1))
		(setq th (* (/ sc1 1000.0) 2)
)
	(command "_insert" "SH_CROSS.dwg" 1000,1000)
	(setq olayer (getvar "clayer"))
	(setvar "clayer" "SPOTLEVELS")
	(SPOT)
 	(if sset (cross))
	(pstext "TK " "" 1)
	(while (eq 1 (logand 1 (getvar "CMDACTIVE")))(command pause))
	(if (/= (getvar "clayer") olayer)
		(setvar "clayer" olayer)
	)
 (princ)
)&lt;/PRE&gt;&lt;P&gt;Then if I redo the WSH function I will not have to assign a value to those variables each time I want to use it?&lt;/P&gt;</description>
    <pubDate>Mon, 22 Aug 2016 11:43:09 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2016-08-22T11:43:09Z</dc:date>
    <item>
      <title>Resusing variables without having to set their value again</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/resusing-variables-without-having-to-set-their-value-again/m-p/6513714#M129416</link>
      <description>&lt;P&gt;I am having trouble reusing a couple variables which I set values to, which I have been researching online on how to set "Global Variables" like surrounding the variable in *'s but nothing seems to be working out.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt; (defun c:WSH( / sset );Write Spot Height
		(setq sc1 (getreal "\n* Enter Plot Scale : "))
		(setq sc2 (* (/ sc1 200) 1))
		(setq th (* (/ sc1 1000.0) 2)
	(command "_insert" "SH_CROSS.dwg" 1000,1000)
	(setq olayer (getvar "clayer"))
	(setvar "clayer" "SPOTLEVELS")
	(SPOT)
 	(if sset (cross))
	(pstext "TK " "" 1)
	(while (eq 1 (logand 1 (getvar "CMDACTIVE")))(command pause))
	(if (/= (getvar "clayer") olayer)
		(setvar "clayer" olayer)
	)
 (princ)
)&lt;/PRE&gt;&lt;P&gt;This is what the routine in general is and I am trying to keep the variables "sc1, sc2 and th" (these variables are used within the other subfunctions) constant so that I don't have to set keep typing in the values. Is there a way I could possible fix this?&lt;/P&gt;</description>
      <pubDate>Mon, 22 Aug 2016 05:34:40 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/resusing-variables-without-having-to-set-their-value-again/m-p/6513714#M129416</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2016-08-22T05:34:40Z</dc:date>
    </item>
    <item>
      <title>Re: Resusing variables without having to set their value again</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/resusing-variables-without-having-to-set-their-value-again/m-p/6513977#M129417</link>
      <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm not absolutely sure what you are trying to achieve, but let's try to clarify matters.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;- First, the convention of naming global variables with names surrounded with asterikses: *some-global-variable* is just a user convention with no semantic meaning: the compiler/interpreter does not change its behaviour in any way for these, they are just names like any other. So it is up to the programmer to use the names sensibly.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;There are no user-definable constants in AutoLISP, so if you have a global variable, there is no way to prevent any part of the program from changing its value. So, if you do not want any other part of the program changing the values, define them as local, for example&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;(defun c:WSH( / sset sc2 th)&lt;/PRE&gt;&lt;P&gt;would define sc2 and th as local so no other part of the program would see them.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;On the other hand, your program doesn't seem to use those itself, so is the idea rally to have them as global?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If the problem is just avoiding giving the scale at every call to WSH, &amp;nbsp;make the (setq sc1 ...) call conditional: if the user just hits ENTER, use the previous value.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;--&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 22 Aug 2016 08:38:15 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/resusing-variables-without-having-to-set-their-value-again/m-p/6513977#M129417</guid>
      <dc:creator>martti.halminen</dc:creator>
      <dc:date>2016-08-22T08:38:15Z</dc:date>
    </item>
    <item>
      <title>Re: Resusing variables without having to set their value again</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/resusing-variables-without-having-to-set-their-value-again/m-p/6514091#M129418</link>
      <description>&lt;P&gt;Sorry for the confusion. What I am trying to do is, once those variables have values set to them, If I want to use the WSH function again, I don't want to have to type the same value over and over again as those values will never change once they are set or once AutoCAD is closed.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This is probably where the Conditional Statement comes into play.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;From what I understand it would roughly be like&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;(cond ((= sc1 nil)(= sc2 nil)(= th nil)
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;; &amp;nbsp;(setting the values for these)
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; )
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ) &amp;nbsp;;continue with the rest of the function&lt;/PRE&gt;&lt;P&gt;The variables "sc1, sc2 and th" &amp;nbsp;are used in other function such as "SPOT" and "CROSS", I just haven't posted them here.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 22 Aug 2016 10:11:04 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/resusing-variables-without-having-to-set-their-value-again/m-p/6514091#M129418</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2016-08-22T10:11:04Z</dc:date>
    </item>
    <item>
      <title>Re: Resusing variables without having to set their value again</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/resusing-variables-without-having-to-set-their-value-again/m-p/6514193#M129419</link>
      <description>&lt;P&gt;One way is to ask for such a value only if it does not already have one:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#ff0000"&gt;&amp;nbsp; (if (not sc1)&lt;/FONT&gt; (setq sc1 (getreal "\n* Enter Plot Scale : "))&lt;FONT color="#ff0000"&gt;)&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#000000"&gt;which you will see some do this way:&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#000000"&gt;&amp;nbsp; &lt;FONT color="#0000ff"&gt;(or&amp;nbsp;sc1 &lt;/FONT&gt;(setq sc1 (getreal "\n* Enter Plot Scale : "))&lt;FONT color="#0000ff"&gt;)&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 22 Aug 2016 11:25:55 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/resusing-variables-without-having-to-set-their-value-again/m-p/6514193#M129419</guid>
      <dc:creator>Kent1Cooper</dc:creator>
      <dc:date>2016-08-22T11:25:55Z</dc:date>
    </item>
    <item>
      <title>Re: Resusing variables without having to set their value again</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/resusing-variables-without-having-to-set-their-value-again/m-p/6514227#M129420</link>
      <description>&lt;P&gt;So if I used;&lt;/P&gt;&lt;PRE&gt; (defun c:WSH( / sset );Write Spot Height
 (or ( sc1 sc2 th)
		(setq sc1 (getreal "\n* Enter Plot Scale : "))
		(setq sc2 (* (/ sc1 200) 1))
		(setq th (* (/ sc1 1000.0) 2)
)
	(command "_insert" "SH_CROSS.dwg" 1000,1000)
	(setq olayer (getvar "clayer"))
	(setvar "clayer" "SPOTLEVELS")
	(SPOT)
 	(if sset (cross))
	(pstext "TK " "" 1)
	(while (eq 1 (logand 1 (getvar "CMDACTIVE")))(command pause))
	(if (/= (getvar "clayer") olayer)
		(setvar "clayer" olayer)
	)
 (princ)
)&lt;/PRE&gt;&lt;P&gt;Then if I redo the WSH function I will not have to assign a value to those variables each time I want to use it?&lt;/P&gt;</description>
      <pubDate>Mon, 22 Aug 2016 11:43:09 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/resusing-variables-without-having-to-set-their-value-again/m-p/6514227#M129420</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2016-08-22T11:43:09Z</dc:date>
    </item>
    <item>
      <title>Re: Resusing variables without having to set their value again</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/resusing-variables-without-having-to-set-their-value-again/m-p/6514232#M129421</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;@Anonymous wrote:&lt;BR /&gt;
&lt;P&gt;...&amp;nbsp;&lt;/P&gt;
&lt;P&gt;This is probably where the Conditional Statement comes into play ....&amp;nbsp;it would roughly be like&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;(cond ((= sc1 nil)(= sc2 nil)(= th nil)
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;; &amp;nbsp;(setting the values for these)
....&lt;/PRE&gt;
&lt;P&gt;....&amp;nbsp;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;A couple of things about that:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;[The (= sc1 nil) thing would &lt;EM&gt;work&lt;/EM&gt;, but it's not necessary to check whether something is "equal to nil" -- you can just check &lt;EM&gt;whether it exists at all&lt;/EM&gt;, with &lt;FONT color="#008000"&gt;(not sc1)&lt;/FONT&gt; or &lt;FONT color="#008000"&gt;(null sc1)&lt;/FONT&gt;.]&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The construction there would need to do &lt;EM&gt;one&lt;/EM&gt; test per condition, and follow it with what to do if that one test does not return nil, rather than&amp;nbsp;&lt;EM&gt;three in a row&lt;/EM&gt; like that.&amp;nbsp; If the idea is to test for the existence of values in&amp;nbsp;&lt;EM&gt;all three&lt;/EM&gt; before going on to set them if they don't exist, it would need to be more like:&lt;/P&gt;
&lt;P&gt;&amp;nbsp; (cond &lt;FONT color="#ff00ff"&gt;(and&lt;/FONT&gt; (not sc1) (not sc2) (not th)&lt;FONT color="#ff00ff"&gt;)&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; ....&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;or&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp; (cond &lt;FONT color="#ff00ff"&gt;(not (or&lt;/FONT&gt;&amp;nbsp;sc1 sc2 th&lt;FONT color="#ff00ff"&gt;))&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; ....&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;But in&amp;nbsp;such a&amp;nbsp;case an (if) function would do just as well.&amp;nbsp; And if by chance one or two, but &lt;EM&gt;not all&lt;/EM&gt;,&amp;nbsp;of those did have values, it would &lt;EM&gt;not&lt;/EM&gt; ask for a value for the one(s) that didn't.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you built it like this:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp; (cond&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; ((not sc1) .... {ask for a value for that} ....)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; ((not sc2) .... {ask for a value for that} ....)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; ((not th) .... {ask for a value for that} ....)&lt;/P&gt;
&lt;P&gt;&amp;nbsp; ); cond&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;then if sc1 had a value, it would &lt;EM&gt;never get&lt;/EM&gt; to checking whether sc2 and/or th had values.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If there would &lt;EM&gt;always&lt;/EM&gt; and &lt;EM&gt;unfailingly&lt;/EM&gt; be values in &lt;EM&gt;all three&lt;/EM&gt; variables if there was a value in &lt;EM&gt;any one&lt;/EM&gt; of them, you could do something like this:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;(if (not sc1) ; check for &lt;EM&gt;any one&lt;/EM&gt; of them&lt;/P&gt;
&lt;P&gt;&amp;nbsp; (setq ; then -- get all three&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; sc1 .... {ask for a value for that} ....&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; sc2 .... {ask for a value for that} ....&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; th .... {ask for a value for that} ....&lt;/P&gt;
&lt;P&gt;&amp;nbsp; ); setq&lt;/P&gt;
&lt;P&gt;); if&lt;/P&gt;</description>
      <pubDate>Mon, 22 Aug 2016 11:45:43 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/resusing-variables-without-having-to-set-their-value-again/m-p/6514232#M129421</guid>
      <dc:creator>Kent1Cooper</dc:creator>
      <dc:date>2016-08-22T11:45:43Z</dc:date>
    </item>
    <item>
      <title>Re: Resusing variables without having to set their value again</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/resusing-variables-without-having-to-set-their-value-again/m-p/6514261#M129422</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;@Anonymous wrote:&lt;BR /&gt;
&lt;P&gt;So if I used;&lt;/P&gt;
&lt;PRE&gt; (defun c:WSH( / sset );Write Spot Height
 (or ( sc1 sc2 th)
		(setq sc1 (getreal "\n* Enter Plot Scale : "))
		(setq sc2 (* (/ sc1 200) 1))
		(setq th (* (/ sc1 1000.0) 2)
)
....&lt;/PRE&gt;
&lt;P&gt;Then if I redo the WSH function I will not have to assign a value to those variables each time I want to use it?&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;[I didn't notice before that the sc2 and th values are &lt;EM&gt;results of&lt;/EM&gt; the sc1 value, so obviously it wouldn't be necessary to &lt;EM&gt;ask for&lt;/EM&gt; values for the later ones after getting one for sc1, as I suggested.]&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#ff6600"&gt;RE-EDIT:&amp;nbsp; As written, sc1 would be taken as a &lt;EM&gt;function name&lt;/EM&gt;.&amp;nbsp; I think what you intend there is:&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#ff6600"&gt;&amp;nbsp; (or (or sc1 sc2 th)&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#ff6600"&gt;or possibly&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#ff6600"&gt;&amp;nbsp; (or (and sc1 sc2 th)&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#ff6600"&gt;But if that's how it's built, then go on to what I originally posted:&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Suppose somehow there's a value in th but not in the others, however that might occur.&amp;nbsp;&amp;nbsp;The&lt;FONT color="#ff6600"&gt; first construction&lt;/FONT&gt; above&amp;nbsp;would &lt;EM&gt;not ask&lt;/EM&gt; for an sc1 value, and therefore it would try to proceed without all the necessary&amp;nbsp;values.&amp;nbsp; Since you can't localize those variables if you want them reusable, but since the others are &lt;EM&gt;resultants from&lt;/EM&gt; sc1, I would do it more like the end of my previous Reply, but of course with the sc2 and th values calculated from sc1 rather than asking for them.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 22 Aug 2016 12:22:00 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/resusing-variables-without-having-to-set-their-value-again/m-p/6514261#M129422</guid>
      <dc:creator>Kent1Cooper</dc:creator>
      <dc:date>2016-08-22T12:22:00Z</dc:date>
    </item>
    <item>
      <title>Re: Resusing variables without having to set their value again</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/resusing-variables-without-having-to-set-their-value-again/m-p/6514292#M129423</link>
      <description>&lt;P&gt;Okay so using the code you supplied. It would end up looking like so;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt; (defun c:WSH( / sset );Write Spot Height
 (if (not sc1)
		(setq sc1 (getreal "\n* Enter Plot Scale : "))
		(setq sc2 (* (/ sc1 200) 1))
		(setq th (* (/ sc1 1000.0) 2)
)
....&lt;/PRE&gt;&lt;P&gt;And after doing this the first time, if I use the "WSH" command again, it will find out if "sc1" has a value and if so it will skip the "setq" stage?&lt;/P&gt;</description>
      <pubDate>Mon, 22 Aug 2016 12:05:33 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/resusing-variables-without-having-to-set-their-value-again/m-p/6514292#M129423</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2016-08-22T12:05:33Z</dc:date>
    </item>
    <item>
      <title>Re: Resusing variables without having to set their value again</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/resusing-variables-without-having-to-set-their-value-again/m-p/6514319#M129424</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;@Anonymous wrote:&lt;BR /&gt;
&lt;P&gt;Okay so using the code you supplied. It would end up looking like so;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;  (if (not sc1)
		(setq sc1 (getreal "\n* Enter Plot Scale : "))
		(setq sc2 (* (/ sc1 200) 1))
		(setq th (* (/ sc1 1000.0) 2)
&lt;/PRE&gt;
&lt;P&gt;And after doing this the first time, if I use the "WSH" command again, it will find out if "sc1" has a value and if so it will skip the "setq" stage?&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;[See my Edit to Post 7, just so you don't miss it.]&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Yes except for missing a right parenthesis at the end of the th setting].&amp;nbsp; If there's a value in sc1, the (not sc1) will return nil, so it won't do what's called for as a 'thenexpr' argument.&amp;nbsp; And you can shortcut that a little -- a &lt;EM&gt;single&lt;/EM&gt; (setq) function can set &lt;EM&gt;more than one&lt;/EM&gt; variable:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp; (if (not sc1)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; (setq&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; sc1&amp;nbsp;(getreal "\n* Enter Plot Scale : ")&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; sc2 (* (/ sc1 200) 1)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; th (* (/ sc1 1000.0) 2)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; ); setq&lt;/P&gt;
&lt;P&gt;&amp;nbsp; ); if&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If there's any possibility that sc1 might&amp;nbsp;have a value but the others might &lt;EM&gt;not&lt;/EM&gt;, consider having that set &lt;EM&gt;only sc1&lt;/EM&gt; within that (if) function, and then &lt;EM&gt;outside&lt;/EM&gt; that, calculate sc2 and th.&amp;nbsp;&amp;nbsp; That way, it won't ask for sc1, but it will still put values into sc2 and th.&lt;/P&gt;</description>
      <pubDate>Mon, 22 Aug 2016 12:17:06 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/resusing-variables-without-having-to-set-their-value-again/m-p/6514319#M129424</guid>
      <dc:creator>Kent1Cooper</dc:creator>
      <dc:date>2016-08-22T12:17:06Z</dc:date>
    </item>
    <item>
      <title>Re: Resusing variables without having to set their value again</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/resusing-variables-without-having-to-set-their-value-again/m-p/6514332#M129425</link>
      <description>&lt;P&gt;Okay that makes sense. Thanks for clearing all the confusion up for me.&lt;/P&gt;</description>
      <pubDate>Mon, 22 Aug 2016 12:22:20 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/resusing-variables-without-having-to-set-their-value-again/m-p/6514332#M129425</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2016-08-22T12:22:20Z</dc:date>
    </item>
    <item>
      <title>Re: Resusing variables without having to set their value again</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/resusing-variables-without-having-to-set-their-value-again/m-p/6515338#M129426</link>
      <description>Hold it a second. If sc1 is to always be the same, then why not just set it? If it might not want to be the same every time, then you have to give the user the ability to change it. But you could make it easy by making the previous value the default so if the user wants to use the previous value, then all he has to do is hit Enter...&lt;BR /&gt;Let's say that the most popular value of sc1 is 3.45&lt;BR /&gt;(if (not sc1)(setq sc1 3.45))&lt;BR /&gt;(if (setq ans (getreal (strcat "\nSC1 &amp;lt;" (rtos sc1 2 2) "&amp;gt;: ")))&lt;BR /&gt;(setq sc1 ans)&lt;BR /&gt;)&lt;BR /&gt;And if you want to hold its latest value between drawings in one AutoCad session, use the vl-bb-set and vl-bb-ref functions, or write its value to a default file or into the registry.</description>
      <pubDate>Mon, 22 Aug 2016 18:10:12 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/resusing-variables-without-having-to-set-their-value-again/m-p/6515338#M129426</guid>
      <dc:creator>john.uhden</dc:creator>
      <dc:date>2016-08-22T18:10:12Z</dc:date>
    </item>
    <item>
      <title>Re: Resusing variables without having to set their value again</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/resusing-variables-without-having-to-set-their-value-again/m-p/6515492#M129427</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/3930636"&gt;@john.uhden&lt;/a&gt; wrote:&lt;BR /&gt;....&amp;nbsp;you could make it easy by making the previous value the default so if the user wants to use the previous value, then all he has to do is hit Enter...&lt;BR /&gt;Let's say that the most popular value of sc1 is 3.45&lt;BR /&gt;(if (not sc1)(setq sc1 3.45))&lt;BR /&gt;(if (setq ans (getreal (strcat "\nSC1 &amp;lt;" (rtos sc1 2 2) "&amp;gt;: ")))&lt;BR /&gt;(setq sc1 ans)&lt;BR /&gt;)&lt;BR /&gt;And if you want to hold its latest value between drawings in one AutoCad session, use the vl-bb-set and vl-bb-ref functions, or write its value to a default file or into the registry.&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;There's a way to offer the previous setting as default if it exists,&amp;nbsp;&lt;EM&gt;without&lt;/EM&gt; that temporary [in this case 'ans'] variable, and even to incorporate an&amp;nbsp;initial default value for Enter even on first use &lt;EM&gt;without&lt;/EM&gt; presetting&amp;nbsp;it&amp;nbsp;if it doesn't exist yet, as done above, and all within one (setq) function.&amp;nbsp; Let's say you want to offer an initial default of 100 if a value has not yet been set for sc1:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;(setq sc1&lt;/P&gt;
&lt;P&gt;&amp;nbsp; (cond&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; ( (getreal &lt;FONT color="#00ccff"&gt;; User input&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; (strcat&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; "\n* Enter Plot Scale &amp;lt;"&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;(if sc1 (rtos sc1 2 2) "100.00")&lt;FONT color="#00ccff"&gt;; offer prior value as default if it exists, otherwise offer 100&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; "&amp;gt;: "&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; )&lt;FONT color="#999999"&gt;; strcat&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; )&lt;FONT color="#999999"&gt;; getreal&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; )&lt;FONT color="#00ccff"&gt;; end User-input&amp;nbsp;condition&amp;nbsp;[returns nil on Enter, going on to:]&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; (sc1)&lt;FONT color="#00ccff"&gt;;&amp;nbsp;Enter on &lt;EM&gt;subsequent&lt;/EM&gt; use -- use prior value [nil if there isn't one, going on to:]&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; (100.0)&lt;FONT color="#00ccff"&gt;; Enter on &lt;EM&gt;first&lt;/EM&gt; use -- no prior value; use initial default&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp; )&lt;FONT color="#999999"&gt;; cond&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;)&lt;FONT color="#999999"&gt;; setq&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;An &lt;EM&gt;Environment Variable&lt;/EM&gt; [via (setenv) / (getenv)]&amp;nbsp;is another way to preserve the value across multiple editing sessions of the same drawing, and apply the same one across multiple drawings without having to set it in each.&amp;nbsp; But if it's a plot scale, presumably you &lt;EM&gt;wouldn't want&lt;/EM&gt; it applied at the same value in all drawings.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Other considerations:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Since sc1 is a plot scale, might it be extractable from something like the DIMSCALE System Variable, rather than having to ask the User for it?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Is there any reason not to simplify the calculations for the sc2 and th variables?&amp;nbsp; [It seems odd to multiply something by 1.]&amp;nbsp; Adjusting from Post 9:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;(if (not sc1)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; (setq&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; sc1&amp;nbsp;(getreal "\n* Enter Plot Scale : ")&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; sc2&amp;nbsp;&lt;FONT color="#ff00ff"&gt;(/ sc1 200)&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; th&amp;nbsp;&lt;FONT color="#ff00ff"&gt;(/ sc1 500)&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; ); setq&lt;/P&gt;
&lt;P&gt;&amp;nbsp; ); if&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Those divisors can be integers [not like the original 1000.0 with decimal], since sc1 will be a real number.&amp;nbsp; Which raises the question:&amp;nbsp; would&amp;nbsp;sc1 always be a &lt;EM&gt;whole number&lt;/EM&gt; [which seems likely for plot scales]?&amp;nbsp; If so, should it use (get&lt;STRONG&gt;int&lt;/STRONG&gt;) instead?&amp;nbsp; If changed to that, the offered default in the (cond) above should be:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;(if sc1 (&lt;FONT color="#ff6600"&gt;itoa&lt;/FONT&gt; sc1) "&lt;FONT color="#ff6600"&gt;100&lt;/FONT&gt;")&lt;FONT color="#00ccff"&gt;; offer prior value as default if it exists, otherwise offer 100&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;and the Enter-on-first-use default should be:&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; (&lt;FONT color="#ff6600"&gt;100&lt;/FONT&gt;)&lt;FONT color="#00ccff"&gt;; Enter on &lt;EM&gt;first&lt;/EM&gt; use -- no prior value; use initial default&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;and those&amp;nbsp;&lt;FONT color="#ff00ff"&gt;&lt;EM&gt;divisors&lt;/EM&gt;&lt;/FONT&gt; in calculating sc2 and th should&amp;nbsp;both be &lt;EM&gt;real numbers&lt;/EM&gt;, or at some scales the sc2 and th values will come out wrong.&lt;/P&gt;</description>
      <pubDate>Mon, 22 Aug 2016 19:06:08 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/resusing-variables-without-having-to-set-their-value-again/m-p/6515492#M129427</guid>
      <dc:creator>Kent1Cooper</dc:creator>
      <dc:date>2016-08-22T19:06:08Z</dc:date>
    </item>
    <item>
      <title>Re: Resusing variables without having to set their value again</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/resusing-variables-without-having-to-set-their-value-again/m-p/6515741#M129428</link>
      <description>Sorta like skinning a cat.&lt;BR /&gt;&lt;BR /&gt;BTW, how do you get your posted code to indent? Tabs?</description>
      <pubDate>Mon, 22 Aug 2016 20:48:57 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/resusing-variables-without-having-to-set-their-value-again/m-p/6515741#M129428</guid>
      <dc:creator>john.uhden</dc:creator>
      <dc:date>2016-08-22T20:48:57Z</dc:date>
    </item>
    <item>
      <title>Re: Resusing variables without having to set their value again</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/resusing-variables-without-having-to-set-their-value-again/m-p/6515996#M129429</link>
      <description>&lt;P&gt;Once the value has been set, it won't ever need to be changed throughout the same drawing because the plan is a constant scale.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;With that, it's not actually the scale of the drawing file itself but a A3 plan template scale which determines the size of the contents within the file.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;One last thing, when I tried to use;&lt;/P&gt;&lt;PRE&gt; (defun c:WSH( / sset );Write Spot Height
  (if (not sc1)
	(setq 
		sc1 (getreal "\n* Enter Plot Scale : ")
		sc2 (* (/ sc1 200) 1)
		th (* (/ sc1 1000.0) 2)
        )&lt;BR /&gt;  )&lt;/PRE&gt;&lt;P&gt;Within the function, when I load the LISP file into the drawing and try to use the command, it says "Unknown Command"???&lt;/P&gt;&lt;P&gt;Have I done something wrong here?&lt;/P&gt;</description>
      <pubDate>Mon, 22 Aug 2016 23:00:46 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/resusing-variables-without-having-to-set-their-value-again/m-p/6515996#M129429</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2016-08-22T23:00:46Z</dc:date>
    </item>
    <item>
      <title>Re: Resusing variables without having to set their value again</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/resusing-variables-without-having-to-set-their-value-again/m-p/6516007#M129430</link>
      <description>It appears that each of you setq lines has an extra parenthesis at the end.&lt;BR /&gt;&lt;BR /&gt;Also, why not just th (/ sc1 500) ?&lt;BR /&gt;And why * 1 ?&lt;BR /&gt;&lt;BR /&gt;I mean it's okay, but the guys around here just love to get picky (mostly with their own work).</description>
      <pubDate>Mon, 22 Aug 2016 23:02:36 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/resusing-variables-without-having-to-set-their-value-again/m-p/6516007#M129430</guid>
      <dc:creator>john.uhden</dc:creator>
      <dc:date>2016-08-22T23:02:36Z</dc:date>
    </item>
    <item>
      <title>Re: Resusing variables without having to set their value again</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/resusing-variables-without-having-to-set-their-value-again/m-p/6516008#M129431</link>
      <description>Looks like you want a session Gremlin?&lt;BR /&gt;Be careful of these as other developed programs might use the&lt;BR /&gt;same variable and may cause a crash that is hard to dig up. BT/DT.&lt;BR /&gt;&lt;BR /&gt;To avoid this, assign a naming convention and stick with it.&lt;BR /&gt;I use a prefix "USER_" followed by the name of the defun.&lt;BR /&gt;For your example it would be "USER_WSH".&lt;BR /&gt;&lt;BR /&gt;If a particular program has more than one value to store&lt;BR /&gt;(for example get_tile in a DCL), create a LIST. Access this&lt;BR /&gt;list using NTH.&lt;BR /&gt;&lt;BR /&gt;(setq USER_WSH (list 10.2 3000 "My time is up"))&lt;BR /&gt;&lt;BR /&gt;(nth 1 USER_WSH) = 3000&lt;BR /&gt;NTH is zero based.&lt;BR /&gt;&lt;BR /&gt;Beyond the basics:&lt;BR /&gt;Looks like you are handling plot chores. It would make sense to&lt;BR /&gt;store the variable as a Dictionary item so as to fetch the variable(s)&lt;BR /&gt;at a later time. Look into VLAX-LDATA-PUT and VLAX-LDATA-GET.&lt;BR /&gt;The information that will be stored in the DWG file is insignificant&lt;BR /&gt;in size /character count such that the file size increase is negligible.&lt;BR /&gt;VLAX-LDATA-PUT does accept LISTs so only one key is required per&lt;BR /&gt;developed program.&lt;BR /&gt;&lt;BR /&gt;???&lt;BR /&gt;</description>
      <pubDate>Mon, 22 Aug 2016 23:02:50 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/resusing-variables-without-having-to-set-their-value-again/m-p/6516008#M129431</guid>
      <dc:creator>scot-65</dc:creator>
      <dc:date>2016-08-22T23:02:50Z</dc:date>
    </item>
    <item>
      <title>Re: Resusing variables without having to set their value again</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/resusing-variables-without-having-to-set-their-value-again/m-p/6516024#M129432</link>
      <description>&lt;P&gt;Yeah I saw that and fixed it up so it's;&lt;/P&gt;&lt;PRE&gt; (defun c:WSH( / sset );Write Spot Height
	(setq 
		sc1 (getreal "\n* Enter Plot Scale : ")
		sc2 (/ sc1 200)
		th (/ sc1 500)
	)&lt;/PRE&gt;&lt;P&gt;But it still will not allow me to use the command. I've tried setting it back to the old version of it but it still ain't letting me use the command.&lt;/P&gt;</description>
      <pubDate>Mon, 22 Aug 2016 23:19:23 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/resusing-variables-without-having-to-set-their-value-again/m-p/6516024#M129432</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2016-08-22T23:19:23Z</dc:date>
    </item>
    <item>
      <title>Re: Resusing variables without having to set their value again</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/resusing-variables-without-having-to-set-their-value-again/m-p/6516139#M129433</link>
      <description>I presume you are posting only an excerpt of your code. If not, then you are missing the closing parenthesis that pairs with (defun. Maybe you want to post the full code.</description>
      <pubDate>Tue, 23 Aug 2016 00:58:51 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/resusing-variables-without-having-to-set-their-value-again/m-p/6516139#M129433</guid>
      <dc:creator>john.uhden</dc:creator>
      <dc:date>2016-08-23T00:58:51Z</dc:date>
    </item>
    <item>
      <title>Re: Resusing variables without having to set their value again</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/resusing-variables-without-having-to-set-their-value-again/m-p/6516151#M129434</link>
      <description>&lt;PRE&gt; (defun c:WSH( / sset );Write Spot Height
	(setq &lt;BR /&gt;                sc1 (getreal "\n*		Enter Plotting Scale	: ")
		sc2 (/ sc1 200)
		th (/ sc1 500)&lt;BR /&gt;        )
	(command "_insert" "SH_CROSS.dwg" 1000,1000)
	(setq olayer (getvar "clayer"))
	(setvar "clayer" "SPOTLEVELS")
	(SPOT)
 	(if sset (cross))
	(pstext "TK " "" 1)
	(while (eq 1 (logand 1 (getvar "CMDACTIVE")))(command pause))
	(if (/= (getvar "clayer") olayer)
		(setvar "clayer" olayer)
	)
 (princ)
)&lt;/PRE&gt;</description>
      <pubDate>Tue, 23 Aug 2016 01:13:53 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/resusing-variables-without-having-to-set-their-value-again/m-p/6516151#M129434</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2016-08-23T01:13:53Z</dc:date>
    </item>
    <item>
      <title>Re: Resusing variables without having to set their value again</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/resusing-variables-without-having-to-set-their-value-again/m-p/6516905#M129435</link>
      <description>&lt;P&gt;I don't see anything obvious that would prevent the command name from being recognized, but I'll take a shot in the dark:&amp;nbsp; Could it be that &lt;EM&gt;a space is required&lt;/EM&gt; after the command name and before the arguments/local-variables list's opening left parenthesis?&amp;nbsp; I've always done that, and that's typically what I see in other people's code,&amp;nbsp;though I don't know whether it's &lt;EM&gt;required&lt;/EM&gt;.&amp;nbsp; But maybe it's trying to use WSH&lt;STRONG&gt;(&lt;/STRONG&gt; as&amp;nbsp;the command name, and then the following syntax is incorrect.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Internally, is&amp;nbsp;the Insert command completed&amp;nbsp;by something in the (spot) or (cross) or (pstext) function? &amp;nbsp;And that 1000,1000 should be in double-quotes [or done as a list].&amp;nbsp; If it's &lt;EM&gt;not&lt;/EM&gt; being completed, and even with that&amp;nbsp;incorrect point-input format,&amp;nbsp;I would expect that to cause a different error, but it should at least recognize the command name, and hit an error only when you run the command.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;[In answer to your earlier question,&amp;nbsp;my preference is&amp;nbsp;&lt;EM&gt;two spaces&lt;/EM&gt; per indentation level.&amp;nbsp; Tabs take up too much space for my taste, and one space doesn't make an obvious-enough difference.]&lt;/P&gt;</description>
      <pubDate>Tue, 23 Aug 2016 11:55:13 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/resusing-variables-without-having-to-set-their-value-again/m-p/6516905#M129435</guid>
      <dc:creator>Kent1Cooper</dc:creator>
      <dc:date>2016-08-23T11:55:13Z</dc:date>
    </item>
  </channel>
</rss>

