<?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: ERROR Converting (command) calls to (command-s) is recommended. in Visual LISP, AutoLISP and General Customization Forum</title>
    <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/error-converting-command-calls-to-command-s-is-recommended/m-p/11379588#M41766</link>
    <description>&lt;P&gt;The other option is also add is this block in dwg already, (tblsearch "block" bname).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If you wrap your enter block name in a while you can exit by say press Enter when you get frustrated with wrong answers.&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="general"&gt;(while (/= (setq Bname (getstring "\nenter block name: ")) "")&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 25 Aug 2022 01:37:14 GMT</pubDate>
    <dc:creator>Sea-Haven</dc:creator>
    <dc:date>2022-08-25T01:37:14Z</dc:date>
    <item>
      <title>ERROR Converting (command) calls to (command-s) is recommended.</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/error-converting-command-calls-to-command-s-is-recommended/m-p/11378686#M41763</link>
      <description>&lt;P&gt;hi,&amp;nbsp;&lt;/P&gt;&lt;P&gt;im trying to write a lisp that insert blocks fast by name with default settings (scale, angel etc)&amp;nbsp;&lt;/P&gt;&lt;P&gt;if im writing the name of the block ok, everything is fine. (and i have no error)&lt;/P&gt;&lt;P&gt;but if im wrong, the lisp repeat itself like i wanted,&amp;nbsp;&lt;/P&gt;&lt;P&gt;and even im writing ok, insert the block, all good.&amp;nbsp;&lt;/P&gt;&lt;P&gt;after that i get an error&lt;/P&gt;&lt;P&gt;"Can't find file in search path:"&lt;/P&gt;&lt;P&gt;**here is a list of all my search paths**&lt;/P&gt;&lt;P&gt;"error: Function cancelled&lt;BR /&gt;Cannot invoke (command) from *error* without prior call to (*push-error-using-command*).&lt;BR /&gt;Converting (command) calls to (command-s) is recommended.&lt;BR /&gt;Command: *Cancel*"&lt;/P&gt;&lt;P&gt;why&amp;nbsp; i get that?&amp;nbsp;&lt;BR /&gt;i thought if the 2nd time i do write the name of the block right, it wouldnt get me that error.&lt;/P&gt;&lt;LI-CODE lang="general"&gt;(defun c:IB (/ Bname )
		(setq Bname (getstring "enter block name: "))
		(if
			(null (findfile (strcat Blocks_path Bname ".dwg")))
			(progn
				(alert (strcat "Can't find  " Bname ".dwg in BLOCKS folder"
				"\nPlease try again"))
				(c:IB)
			);progn
		);if
		(command "_.insert" (strcat Blocks_path Bname ".dwg") pause)
		(while (&amp;gt; (getvar "CMDACTIVE") 0)
			(command "")	  
		);while
		(command ".explode" (entlast))
	(princ)
	);defun&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Bname - is the block name&amp;nbsp;&lt;/P&gt;&lt;P&gt;Blocks_path - is my blocks path folder already set in my accaddoc file&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;tnx for ure help &lt;span class="lia-unicode-emoji" title=":grinning_face_with_big_eyes:"&gt;😃&lt;/span&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 24 Aug 2022 16:00:18 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/error-converting-command-calls-to-command-s-is-recommended/m-p/11378686#M41763</guid>
      <dc:creator>sunlight1</dc:creator>
      <dc:date>2022-08-24T16:00:18Z</dc:date>
    </item>
    <item>
      <title>Re: ERROR Converting (command) calls to (command-s) is recommended.</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/error-converting-command-calls-to-command-s-is-recommended/m-p/11378713#M41764</link>
      <description>&lt;P&gt;If you close AutoCAD and start over, and run no other routines before you try this, does it still give you that error?&amp;nbsp; I suspect you have some other AutoLisp routine that sets an *error* handler involving some (command) function(s), which has been frowned upon since [I think] Acad 2015, but only within custom *error* handlers.&amp;nbsp; A routine with a faulty one must not be setting AutoCAD's regular one back properly, but restarting should.&amp;nbsp; If that fixes it, any routines that have *error* handling should be corrected to assure they properly reset AutoCAD's.&lt;/P&gt;</description>
      <pubDate>Wed, 24 Aug 2022 16:09:57 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/error-converting-command-calls-to-command-s-is-recommended/m-p/11378713#M41764</guid>
      <dc:creator>Kent1Cooper</dc:creator>
      <dc:date>2022-08-24T16:09:57Z</dc:date>
    </item>
    <item>
      <title>Re: ERROR Converting (command) calls to (command-s) is recommended.</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/error-converting-command-calls-to-command-s-is-recommended/m-p/11378972#M41765</link>
      <description>&lt;P&gt;Not sure about your error but this recursive calling of yours is definitely not right. You can think of why.&lt;/P&gt;
&lt;P&gt;Edit: I did not read your issue carefully - your issue actually is the wrong usage of recursive calling.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Say, you typed the wrong name. The routine re-calls itself. Now you type the right one (for simplicity). The routine will go thru to the end successfully. But after that, it continues to evaluate the rest of the routine from the initial wrong-name run.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;(defun c:IB (/ Bname )
  (setq Bname (getstring "enter block name: "))
  (if
    (null (findfile (strcat Blocks_path Bname ".dwg")))
    (progn
      (alert (strcat "Can't find  " Bname ".dwg in BLOCKS folder"
		     "\nPlease try again"))
      (c:IB) ; &lt;FONT color="#FF0000"&gt;&lt;STRONG&gt;it runs itself from here, and when is done, continues from here to finish the code&lt;/STRONG&gt;&lt;/FONT&gt;
      );progn
    );if
  (command "_.insert" (strcat Blocks_path &lt;FONT color="#0000FF"&gt;&lt;STRONG&gt;Bname&lt;/STRONG&gt; &lt;/FONT&gt;".dwg") pause)
  (while (&amp;gt; (getvar "CMDACTIVE") 0)
	   (command "")
	   );while
    (command ".explode" (entlast))
    (princ)
    );defun
&lt;/PRE&gt;
&lt;P&gt;Then it fails on Bname still holding a wrong name - since it's localized it's not overwritten by the correct one from the new run.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Spoiler alert!&lt;/P&gt;
&lt;PRE&gt;&lt;FONT color="#FFFFFF"&gt;(defun c:IB (/ Bname )
  
  (while (not (and (setq Bname (getstring t "Enter block name: "))
		   (or (findfile (strcat Blocks_path Bname ".dwg"))
		       (alert (strcat "Can't find  " Bname ".dwg in BLOCKS folder" "\nPlease try again"))))))
  
  (command "_.insert" (strcat Blocks_path Bname ".dwg") "_s" 1 "_r" 0 pause)
  (while (&amp;gt; (getvar "CMDACTIVE") 0) (command ""))
  (command ".explode" (entlast))
  (princ)
  )&lt;/FONT&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 25 Aug 2022 07:45:08 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/error-converting-command-calls-to-command-s-is-recommended/m-p/11378972#M41765</guid>
      <dc:creator>ВeekeeCZ</dc:creator>
      <dc:date>2022-08-25T07:45:08Z</dc:date>
    </item>
    <item>
      <title>Re: ERROR Converting (command) calls to (command-s) is recommended.</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/error-converting-command-calls-to-command-s-is-recommended/m-p/11379588#M41766</link>
      <description>&lt;P&gt;The other option is also add is this block in dwg already, (tblsearch "block" bname).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If you wrap your enter block name in a while you can exit by say press Enter when you get frustrated with wrong answers.&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="general"&gt;(while (/= (setq Bname (getstring "\nenter block name: ")) "")&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 25 Aug 2022 01:37:14 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/error-converting-command-calls-to-command-s-is-recommended/m-p/11379588#M41766</guid>
      <dc:creator>Sea-Haven</dc:creator>
      <dc:date>2022-08-25T01:37:14Z</dc:date>
    </item>
    <item>
      <title>Re: ERROR Converting (command) calls to (command-s) is recommended.</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/error-converting-command-calls-to-command-s-is-recommended/m-p/11380087#M41767</link>
      <description>&lt;P&gt;Now, a challenge for ya. Why this code, still using a recursive call, is working just fain...&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;(defun c:IB (/ Bname )
  
  (setq Bname (getstring "enter block name: "))
  
  (if (or (findfile (strcat Blocks_path Bname ".dwg"))
	  (alert (strcat "Can't find  " Bname ".dwg in BLOCKS folder"
			 "\nPlease try again"))
	  (c:IB))
    (command "_.insert" (strcat Blocks_path Bname ".dwg") "_s" 1 "_r" 0 pause
	     ".explode" (entlast)))
  
  ; (princ)
  );defun
&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 25 Aug 2022 07:51:44 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/error-converting-command-calls-to-command-s-is-recommended/m-p/11380087#M41767</guid>
      <dc:creator>ВeekeeCZ</dc:creator>
      <dc:date>2022-08-25T07:51:44Z</dc:date>
    </item>
    <item>
      <title>Re: ERROR Converting (command) calls to (command-s) is recommended.</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/error-converting-command-calls-to-command-s-is-recommended/m-p/11386120#M41768</link>
      <description>&lt;P&gt;first of all i was busy on the weekend, so im sorry that i couldnt answer faster.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/69526"&gt;@Kent1Cooper&lt;/a&gt;&amp;nbsp; i did restart and the problem didnt go anywhere.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/1779365"&gt;@ВeekeeCZ&lt;/a&gt;&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;first of all i knew that "&lt;STRONG&gt;(c:IB)&lt;/STRONG&gt;"&amp;nbsp; is probably a wrong way to go with.&amp;nbsp;&lt;/P&gt;&lt;P&gt;but i couldnt think of another way, myb i went for the "short lazy way"&amp;nbsp;&lt;/P&gt;&lt;P&gt;this is intersting what ure saying&lt;/P&gt;&lt;P&gt;since Bname is&amp;nbsp;&lt;SPAN&gt;localized,&amp;nbsp;&amp;nbsp;combine with recall IB&amp;nbsp; im ending with 2 different lisps&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;1 successfully closed and 1 still open with a&amp;nbsp; wrong value.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;what a mess =(&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;i wont go with recalling again.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;anyway, ure spoiler is working tnx. thats a better way to do it&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;and for ure last messege - its working fine cos u use OR, which is filtering all wrong values of Bname and stuck them in the IF.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;only 1 TRUE&amp;nbsp; Bname will send him free to the insert command,&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;while i went on the NULL "way" ,&amp;nbsp; collected all the wrong values and activate PROGN on them and sent them free from the loop with calling IB again.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;i hope i got it.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;BTW u have ";" at the (princ) &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 28 Aug 2022 14:57:37 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/error-converting-command-calls-to-command-s-is-recommended/m-p/11386120#M41768</guid>
      <dc:creator>sunlight1</dc:creator>
      <dc:date>2022-08-28T14:57:37Z</dc:date>
    </item>
    <item>
      <title>Re: ERROR Converting (command) calls to (command-s) is recommended.</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/error-converting-command-calls-to-command-s-is-recommended/m-p/11386228#M41769</link>
      <description>&lt;P&gt;Ok, ok, you're good!!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/11186444"&gt;@sunlight1&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;&lt;SPAN&gt;BTW u have ";" at the (princ) &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Yeap! That's the one! The challenge. Why I did do it? And can you fix it for me? It's not nice.&amp;nbsp;&lt;span class="lia-unicode-emoji" title=":thinking_face:"&gt;🤔&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Sun, 28 Aug 2022 16:53:50 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/error-converting-command-calls-to-command-s-is-recommended/m-p/11386228#M41769</guid>
      <dc:creator>ВeekeeCZ</dc:creator>
      <dc:date>2022-08-28T16:53:50Z</dc:date>
    </item>
    <item>
      <title>Re: ERROR Converting (command) calls to (command-s) is recommended.</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/error-converting-command-calls-to-command-s-is-recommended/m-p/11387409#M41770</link>
      <description>&lt;P&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/1779365"&gt;@ВeekeeCZ&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;no im not THAT good.&amp;nbsp;&lt;/P&gt;&lt;P&gt;im still learning, started 8 months ago fron 0 lol so far i know how the code goes, but sometimes not the details.&amp;nbsp;&lt;/P&gt;&lt;P&gt;so plz explain &lt;STRONG&gt;why did u do it.&amp;nbsp;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;i know princ at the end came to clear the end line&amp;nbsp;&lt;/P&gt;&lt;P&gt;but why in ure code if i use princ it will get error?&amp;nbsp;&amp;nbsp;&lt;BR /&gt;i tried to search about it but no luck.&amp;nbsp;&lt;/P&gt;&lt;P&gt;i guesss shame on me if u thought i know that&amp;nbsp;&lt;/P&gt;&lt;P&gt;i just pointed on the ";" cos u didnt activated the (princ), i thought the princ should be there.&amp;nbsp;&lt;/P&gt;&lt;P&gt;while the opposite is correct.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 29 Aug 2022 11:18:38 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/error-converting-command-calls-to-command-s-is-recommended/m-p/11387409#M41770</guid>
      <dc:creator>sunlight1</dc:creator>
      <dc:date>2022-08-29T11:18:38Z</dc:date>
    </item>
    <item>
      <title>Re: ERROR Converting (command) calls to (command-s) is recommended.</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/error-converting-command-calls-to-command-s-is-recommended/m-p/11387631#M41771</link>
      <description>&lt;P&gt;No worries. Called it a challenge for a reason.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Here's a hint for you:&amp;nbsp;(and (princ))&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 29 Aug 2022 12:56:40 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/error-converting-command-calls-to-command-s-is-recommended/m-p/11387631#M41771</guid>
      <dc:creator>ВeekeeCZ</dc:creator>
      <dc:date>2022-08-29T12:56:40Z</dc:date>
    </item>
    <item>
      <title>Re: ERROR Converting (command) calls to (command-s) is recommended.</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/error-converting-command-calls-to-command-s-is-recommended/m-p/11390182#M41772</link>
      <description>&lt;P&gt;ok i got it.&amp;nbsp;&lt;/P&gt;&lt;P&gt;but now please explain to me what true about that princ? or why he has to be inside ?&amp;nbsp;&lt;BR /&gt;and my lisp still returns nil at the end? is that cos the "and" returns nil?&amp;nbsp;&lt;BR /&gt;so basictly ill always get nil in that&amp;nbsp;lisp structure. (i dont care much but just for explaining what happend here)&amp;nbsp;&lt;/P&gt;&lt;P&gt;p.s- acording to that lisp below , i dont need the while&amp;nbsp; CMDACTIVE-0 from my post? seems to me that its working just fine, even on Dynamic blocks&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="general"&gt;(defun c:IB (/ Bname ) ;insert block by name
	(setq Bname (getstring "enter block name: "))
	(and 
		(if (or (findfile (strcat Blocks_path Bname ".dwg"))
			(alert (strcat "Can't find  " Bname ".dwg in BLOCKS folder"
						 "\nPlease try again"))
			(c:IB))
			(command "_.insert" (strcat Blocks_path Bname ".dwg") "_s" 1 "_r" 0 pause
					 ".explode" (entlast))
		);if
	(princ)
	);and
);defun&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 30 Aug 2022 11:29:01 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/error-converting-command-calls-to-command-s-is-recommended/m-p/11390182#M41772</guid>
      <dc:creator>sunlight1</dc:creator>
      <dc:date>2022-08-30T11:29:01Z</dc:date>
    </item>
    <item>
      <title>Re: ERROR Converting (command) calls to (command-s) is recommended.</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/error-converting-command-calls-to-command-s-is-recommended/m-p/11390273#M41773</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/1779365"&gt;@ВeekeeCZ&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;Now, a challenge for ya. Why this code, still using a recursive call, is working just fain...&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;(defun c:IB (/ Bname )
  
  (setq Bname (getstring "enter block name: "))
  
  (if (or (findfile (strcat Blocks_path Bname ".dwg"))
	  (alert (strcat "Can't find  " Bname ".dwg in BLOCKS folder"
			 "\nPlease try again"))
	  &lt;FONT color="#FF0000"&gt;&lt;STRONG&gt;(c:IB)&lt;/STRONG&gt;&lt;/FONT&gt;)
    (command "_.insert" (strcat Blocks_path Bname ".dwg") "_s" 1 "_r" 0 pause
	     ".explode" (entlast)))
  
  ; (princ)
  );defun
&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Remember, any value &lt;STRONG&gt;but&lt;/STRONG&gt; &lt;EM&gt;nil&lt;/EM&gt;, is True.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;So, when it's returning from the second run to finish the first one, you need to make sure that (c:IB) returns nil, -&amp;gt; OR=nil, IF=nil, therefore it's not inserting any other block.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;(c:IB) function returns the value of the last expression inside. In this case, it was (princ), which is T. If (princ) is commented out, then the last one would be IF. And IF would return:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;- if the condition statement of IF is T, it returns T/nil of THEN statement, which is (command...) which returns always nil.&lt;/P&gt;
&lt;P&gt;- if cond of IF is nil, and there is no ELSE statement, then the result is nil (never happens in this case)&lt;/P&gt;
&lt;P&gt;- if cond of IF is nil, and there is some ELSE statement, it returns T/nil of ELSE (irrelevant for this case).&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;So... another possible solution is:&lt;/P&gt;
&lt;PRE&gt;(defun c:IB (/ Bname )
  
  (setq Bname (getstring "enter block name: "))
  
  (if (or (findfile (strcat Blocks_path Bname ".dwg"))
	  (alert (strcat "Can't find  " Bname ".dwg in BLOCKS folder"
			 "\nPlease try again"))
	 &lt;FONT color="#FF0000"&gt;&lt;STRONG&gt; (not&lt;/STRONG&gt; &lt;/FONT&gt;(c:IB)&lt;STRONG&gt;&lt;FONT color="#FF0000"&gt;)&lt;/FONT&gt;&lt;/STRONG&gt;
	  )
    (command "_.insert" (strcat Blocks_path Bname ".dwg") "_s" 1 "_r" 0 pause
	     "_.explode" (entlast)))
  
  (princ)
  )
&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Your solution....It's a mess that luckily works and you have no idea why.&lt;/P&gt;</description>
      <pubDate>Tue, 30 Aug 2022 12:13:31 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/error-converting-command-calls-to-command-s-is-recommended/m-p/11390273#M41773</guid>
      <dc:creator>ВeekeeCZ</dc:creator>
      <dc:date>2022-08-30T12:13:31Z</dc:date>
    </item>
    <item>
      <title>Re: ERROR Converting (command) calls to (command-s) is recommended.</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/error-converting-command-calls-to-command-s-is-recommended/m-p/11390476#M41774</link>
      <description>&lt;P&gt;its a mess right lol&lt;/P&gt;&lt;P&gt;but after ure explanation, i know what i didnt knew before&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;that i had to ensure c:IB is nil before the end.&amp;nbsp;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;after u said it, i know why my lisp is working.&amp;nbsp;&lt;/P&gt;&lt;P&gt;my last expression is AND which has IF and PRINC&amp;nbsp;&lt;/P&gt;&lt;P&gt;the IF will always return NIL cos the THEN is a command that always returns NIL.&amp;nbsp;&lt;/P&gt;&lt;P&gt;so the AND will always return NIL.&amp;nbsp;&lt;/P&gt;&lt;P&gt;then c:IB will get NIL.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;yea, i didnt know that, thats why i asked for an explanation.&amp;nbsp;&lt;/P&gt;&lt;P&gt;tnx for the &lt;SPAN&gt;challenge&amp;nbsp;it was great !&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 30 Aug 2022 13:15:04 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/error-converting-command-calls-to-command-s-is-recommended/m-p/11390476#M41774</guid>
      <dc:creator>sunlight1</dc:creator>
      <dc:date>2022-08-30T13:15:04Z</dc:date>
    </item>
  </channel>
</rss>

