<?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: Help - Routine from another lisp routine. in Visual LISP, AutoLISP and General Customization Forum</title>
    <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/help-routine-from-another-lisp-routine/m-p/10830243#M52813</link>
    <description>YAY!!&lt;BR /&gt;We love people like you who refuse to give up AND find a way to solve their&lt;BR /&gt;own problem.</description>
    <pubDate>Fri, 17 Dec 2021 22:52:34 GMT</pubDate>
    <dc:creator>john.uhden</dc:creator>
    <dc:date>2021-12-17T22:52:34Z</dc:date>
    <item>
      <title>Help - Routine from another lisp routine.</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/help-routine-from-another-lisp-routine/m-p/10743737#M52780</link>
      <description>&lt;P&gt;Hi everyone!&amp;nbsp;&lt;span class="lia-unicode-emoji" title=":waving_hand:"&gt;👋&lt;/span&gt;&lt;/P&gt;&lt;P&gt;I have a lisp routine called "CD", I use this routine to insert multiple blocks. When I call it the "CD" routine in autoCAD, it asks me to enter a text, for example "AB", which corresponds to a certain block, finally it asks me the point where I want to insert the block.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I need to call the "CD" routine from another lisp routine.&lt;/P&gt;&lt;P&gt;I've been looking on the internet and with "COMMAND", it's done.&lt;/P&gt;&lt;P&gt;I want to insert several blocks at the same time, without having to call the lisp routine "CD" again and write the text that corresponds to the other block.&lt;/P&gt;&lt;LI-CODE lang="lisp"&gt;(command "._CD" "AB" ""); Block 1
(command "._CD" "AC" ""); Block 2
(command "._CD" "AD" ""); Block 3&lt;/LI-CODE&gt;&lt;P&gt;But it doesn't work for me, I can only insert the first block.&lt;/P&gt;&lt;P&gt;Could you tell me or explain how I could do this.&lt;BR /&gt;Thank you very much for reading my message.&lt;BR /&gt;Greetings.&lt;/P&gt;</description>
      <pubDate>Mon, 08 Nov 2021 22:30:20 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/help-routine-from-another-lisp-routine/m-p/10743737#M52780</guid>
      <dc:creator>arperezinf</dc:creator>
      <dc:date>2021-11-08T22:30:20Z</dc:date>
    </item>
    <item>
      <title>Re: Help - Routine from another lisp routine.</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/help-routine-from-another-lisp-routine/m-p/10743808#M52781</link>
      <description>&lt;P&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/1203560"&gt;@arperezinf&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You can't call an AutoLisp command function with the (command ...) function.&lt;/P&gt;
&lt;P&gt;You can call another AutoLisp command function the same way as you would call any other lisp function...&lt;/P&gt;
&lt;P&gt;(C:mycommand) in parentheses.&lt;/P&gt;
&lt;P&gt;Note that since we basically never create command functions to accept any argument, you can't supply it one as say&lt;/P&gt;
&lt;P&gt;(c:mycommand "AB").&amp;nbsp; I mean you CAN, but there's no sense to it.&lt;/P&gt;
&lt;P&gt;BUT you can make a copy of your command function but leave out the C: and add an argument name, eg.&lt;/P&gt;
&lt;P&gt;(defun mycommand (arg / a b c) ...)&lt;/P&gt;
&lt;P&gt;and then call it via (mycommand "AB").&lt;/P&gt;
&lt;P&gt;Oh, and it can be in the same .lsp file.&lt;/P&gt;
&lt;P&gt;Even better than that...&lt;/P&gt;
&lt;LI-CODE lang="general"&gt;(defun c:Mycommand ( / str)
  (setq str (getstring "\nEnter block name: "))
  (mycommand str)
  (princ)
)&lt;/LI-CODE&gt;</description>
      <pubDate>Mon, 08 Nov 2021 23:28:22 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/help-routine-from-another-lisp-routine/m-p/10743808#M52781</guid>
      <dc:creator>john.uhden</dc:creator>
      <dc:date>2021-11-08T23:28:22Z</dc:date>
    </item>
    <item>
      <title>Re: Help - Routine from another lisp routine.</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/help-routine-from-another-lisp-routine/m-p/10743863#M52782</link>
      <description>&lt;P&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/1203560"&gt;@arperezinf&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;OR, look at the use of vlax-add-cmd.&lt;/P&gt;</description>
      <pubDate>Tue, 09 Nov 2021 00:09:45 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/help-routine-from-another-lisp-routine/m-p/10743863#M52782</guid>
      <dc:creator>john.uhden</dc:creator>
      <dc:date>2021-11-09T00:09:45Z</dc:date>
    </item>
    <item>
      <title>Re: Help - Routine from another lisp routine.</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/help-routine-from-another-lisp-routine/m-p/10743867#M52783</link>
      <description>&lt;P&gt;You can call another lisp from within a lisp, if the "CD" lisp is not loaded the call will fail, a simple check is to see if "CD" is a relevant command. Load if missing.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="lisp"&gt;(if (not CD)(load "myCDprogram)) ; put at start so only checked once

(command "._CD" STR "")&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 09 Nov 2021 00:16:06 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/help-routine-from-another-lisp-routine/m-p/10743867#M52783</guid>
      <dc:creator>Sea-Haven</dc:creator>
      <dc:date>2021-11-09T00:16:06Z</dc:date>
    </item>
    <item>
      <title>Re: Help - Routine from another lisp routine.</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/help-routine-from-another-lisp-routine/m-p/10743885#M52784</link>
      <description>&lt;P&gt;NNZZZTTT.&lt;/P&gt;
&lt;P&gt;C:CD is not an AutoCAD command until he makes it one.&lt;/P&gt;</description>
      <pubDate>Tue, 09 Nov 2021 00:29:03 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/help-routine-from-another-lisp-routine/m-p/10743885#M52784</guid>
      <dc:creator>john.uhden</dc:creator>
      <dc:date>2021-11-09T00:29:03Z</dc:date>
    </item>
    <item>
      <title>Re: Help - Routine from another lisp routine.</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/help-routine-from-another-lisp-routine/m-p/10765106#M52785</link>
      <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/3930636"&gt;@john.uhden&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Sorry for the delay with this query, but I'm still unable to achieve what I need. I tried to try his example, but it doesn't work for me.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have a lisp function called "CD", when I execute the CD function, it asks me for a parameter of the text type, it asks me for an insertion point and it inserts a block.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;For example:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I write CD, it asks me to "Enter the Alias ​​of the symbol", I write the alias of the symbol (which is a text for example "AB") and I do enter, then it shows me the symbol (which is a block), then It prompts me for an insertion point and then when I click or press the enter key anywhere on the plane, the alias block of the symbol I enter is drawn.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have 5 blocks&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Block 1 - AB&lt;BR /&gt;Block 2 - AC&lt;BR /&gt;Block 3 - AD&lt;BR /&gt;Block 4 - AE&lt;BR /&gt;Block 5 - AF&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I need to call the lisp CD function, draw the 5 blocks, one behind the other block, without having to enter the names of the blocks, but if I could find the insertion point of the blocks and at the end continue with another function lisp.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I hope you understand me&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you very much for reading my message.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 18 Nov 2021 02:42:41 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/help-routine-from-another-lisp-routine/m-p/10765106#M52785</guid>
      <dc:creator>arperezinf</dc:creator>
      <dc:date>2021-11-18T02:42:41Z</dc:date>
    </item>
    <item>
      <title>Re: Help - Routine from another lisp routine.</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/help-routine-from-another-lisp-routine/m-p/10765294#M52786</link>
      <description>&lt;P&gt;Post your CD lisp so we can see what your doing otherwise people trying to help are going around in circles.&lt;/P&gt;</description>
      <pubDate>Thu, 18 Nov 2021 05:49:27 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/help-routine-from-another-lisp-routine/m-p/10765294#M52786</guid>
      <dc:creator>Sea-Haven</dc:creator>
      <dc:date>2021-11-18T05:49:27Z</dc:date>
    </item>
    <item>
      <title>Re: Help - Routine from another lisp routine.</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/help-routine-from-another-lisp-routine/m-p/10766517#M52787</link>
      <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/6254908"&gt;@Sea-Haven&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Sorry, I am not uploading the CD lisp routine to the forum, because I do not have access to the CD function, so I am explaining what the CD function does, and since I do not have access to the CD function, for that reason I want to make a function lisp, which calls the CD function, so that it loads the 5 blocks at once, requesting an insertion point for each block.&lt;/P&gt;&lt;P&gt;So, do you have any idea how to build something to call the CD function, from another lisp routine and insert the 5 blocks, asking me for the insertion point ?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you very much for reading my message.&lt;/P&gt;</description>
      <pubDate>Thu, 18 Nov 2021 16:02:52 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/help-routine-from-another-lisp-routine/m-p/10766517#M52787</guid>
      <dc:creator>arperezinf</dc:creator>
      <dc:date>2021-11-18T16:02:52Z</dc:date>
    </item>
    <item>
      <title>Re: Help - Routine from another lisp routine.</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/help-routine-from-another-lisp-routine/m-p/10766622#M52788</link>
      <description>&lt;P&gt;Okay, if CD is actually an AutoCAD command then maybe...&lt;/P&gt;
&lt;LI-CODE lang="lisp"&gt;(defun c:CDALL ()
  (command "._CD" "AB" ""); Block 1
  (command "._CD" "AC" ""); Block 2
  (command "._CD" "AD" ""); Block 3
  (command "._CD" "AE" ""); Block 4
  (command "._CD" "AF" ""); Block 5
  (princ)
)&lt;/LI-CODE&gt;
&lt;P&gt;But if each CD command is waiting for an insertion point, I don't understand the "".&lt;/P&gt;
&lt;P&gt;With cmdecho turned on could you please run CD just once and post what the textscreen shows?&lt;/P&gt;</description>
      <pubDate>Thu, 18 Nov 2021 16:43:17 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/help-routine-from-another-lisp-routine/m-p/10766622#M52788</guid>
      <dc:creator>john.uhden</dc:creator>
      <dc:date>2021-11-18T16:43:17Z</dc:date>
    </item>
    <item>
      <title>Re: Help - Routine from another lisp routine.</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/help-routine-from-another-lisp-routine/m-p/10766823#M52789</link>
      <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/3930636"&gt;@john.uhden&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I tried what you said, but it doesn't work for me, it just gives me the first block "AB", the CD function is not called again.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This is what it shows me when I call the lisp CD function.&lt;/P&gt;&lt;P&gt;Point 1: This shows when I write CD.&lt;BR /&gt;Point 2: This shows when I hit the enter key.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="arperezinf_lisp_function.png" style="width: 370px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/991264i35EE83E85DDB5671/image-size/large?v=v2&amp;amp;px=999" role="button" title="arperezinf_lisp_function.png" alt="arperezinf_lisp_function.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;This is all that the CD lisp function shows.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you very much for reading my message.&lt;/P&gt;</description>
      <pubDate>Thu, 18 Nov 2021 18:16:25 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/help-routine-from-another-lisp-routine/m-p/10766823#M52789</guid>
      <dc:creator>arperezinf</dc:creator>
      <dc:date>2021-11-18T18:16:25Z</dc:date>
    </item>
    <item>
      <title>Re: Help - Routine from another lisp routine.</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/help-routine-from-another-lisp-routine/m-p/10766901#M52790</link>
      <description>&lt;P&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/1203560"&gt;@arperezinf&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I wasn't clear enough.&lt;/P&gt;
&lt;P&gt;1.&amp;nbsp; Type CMDECHO and make sure it's 1.&lt;/P&gt;
&lt;P&gt;2.&amp;nbsp; Execute the command CD and respond to the prompts.&lt;/P&gt;
&lt;P&gt;3.&amp;nbsp; After the command completes, hit the F2 key and it will bring up your text screen.&lt;/P&gt;
&lt;P&gt;4.&amp;nbsp; Copy and paste what's on that screen into a new response.&lt;/P&gt;
&lt;P&gt;Thanks.&amp;nbsp; We'll figure this out.&lt;/P&gt;</description>
      <pubDate>Thu, 18 Nov 2021 18:48:29 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/help-routine-from-another-lisp-routine/m-p/10766901#M52790</guid>
      <dc:creator>john.uhden</dc:creator>
      <dc:date>2021-11-18T18:48:29Z</dc:date>
    </item>
    <item>
      <title>Re: Help - Routine from another lisp routine.</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/help-routine-from-another-lisp-routine/m-p/10767076#M52791</link>
      <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/3930636"&gt;@john.uhden&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This is what it shows me when I do CMDECHO and run the CD command.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="arperezinf_lisp_funcion_command.png" style="width: 370px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/991318iE6B152434E3C6D90/image-size/large?v=v2&amp;amp;px=999" role="button" title="arperezinf_lisp_funcion_command.png" alt="arperezinf_lisp_funcion_command.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;That's all it shows&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you very much for reading my message.&lt;BR /&gt;Greetings.&lt;/P&gt;</description>
      <pubDate>Thu, 18 Nov 2021 20:06:12 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/help-routine-from-another-lisp-routine/m-p/10767076#M52791</guid>
      <dc:creator>arperezinf</dc:creator>
      <dc:date>2021-11-18T20:06:12Z</dc:date>
    </item>
    <item>
      <title>Re: Help - Routine from another lisp routine.</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/help-routine-from-another-lisp-routine/m-p/10767173#M52792</link>
      <description>&lt;P&gt;I meant to copy the text from the text screen (command history) into your typed response, but I think what you gave us may be good enough.&lt;/P&gt;
&lt;P&gt;So the command is looking for just two (2) responses it seems, being...&lt;/P&gt;
&lt;P&gt;1.&amp;nbsp; The name of the block to insert.&lt;/P&gt;
&lt;P&gt;2.&amp;nbsp; The insertion point.&lt;/P&gt;
&lt;P&gt;Is that correct?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;That doesn't make sense if you are using (command "_.CD" "AA" "") because how would it get the insertion point?&lt;/P&gt;
&lt;P&gt;Does the command repeat within itself, repeatedly prompting for an insertion point?&amp;nbsp; What happens if you don't provide an insertion point?&amp;nbsp; Does it insert the same block at some previous point?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;And didn't you say you want all 5 blocks to insert at the same location at the first?&lt;/P&gt;</description>
      <pubDate>Thu, 18 Nov 2021 20:56:19 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/help-routine-from-another-lisp-routine/m-p/10767173#M52792</guid>
      <dc:creator>john.uhden</dc:creator>
      <dc:date>2021-11-18T20:56:19Z</dc:date>
    </item>
    <item>
      <title>Re: Help - Routine from another lisp routine.</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/help-routine-from-another-lisp-routine/m-p/10767485#M52793</link>
      <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/3930636"&gt;@john.uhden&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Yes, what you say is correct, the command only looks for two options, just as you say.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I do not want the 5 blocks to be inserted all in the same place, I need the CD command to continue working, because that command is the one who controls the blocks, I only need a lisp function that passes the names of the blocks to the CD command, without have to write them and let the CD command do the rest of the process, find me block1, show it, ask me for the insertion point and repeat the process and when those 5 blocks are inserted, stop the CD command.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I do not know if this will be possible to do so.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I give you a little more information and sorry if I repeat the same thing again, but I am trying not to be confused.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The CD command works with many blocks (like a database), each one is called by text (alias symbols), for example "AB", which represents say "Block 1". So, if I don't write the alias of the symbol, it doesn't insert anything and I have to press the escape key to cancel the command.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;When I use the CD command for the first time, it doesn't know which block I want to insert, so I have to tell it which block I want to insert. Once the CD command is used, it recognizes the last inserted block, if you look at the images you can see where it says "Symbol Aliases", there is a text for example: "&amp;lt;PV&amp;gt;" between the symbols for greater than and less than, that text corresponds to the last inserted block and in the white area where we insert the text, it also puts the same text as above: "PV" of the last inserted block.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Therefore, if I use the command once and press the enter key again, I can re-insert the last block for example: "PV", if I press the enter key again repeat the same process and insert the same block " PV ", I can insert the blocks in any part of the plane and until I enter a new alias of the symbol, I will not change the block, so if it was the CD command, the last one I use, I can press the enter key several times and repeat the previous process&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I hope you understand me up to here.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you very much for reading my message.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Greetings.&lt;/P&gt;</description>
      <pubDate>Fri, 19 Nov 2021 00:15:08 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/help-routine-from-another-lisp-routine/m-p/10767485#M52793</guid>
      <dc:creator>arperezinf</dc:creator>
      <dc:date>2021-11-19T00:15:08Z</dc:date>
    </item>
    <item>
      <title>Re: Help - Routine from another lisp routine.</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/help-routine-from-another-lisp-routine/m-p/10767500#M52794</link>
      <description>Okay, I get it.&lt;BR /&gt;So, do you want one command that inserts the same 5 blocks, in sequence?&lt;BR /&gt;Is it always the same 5 blocks?&lt;BR /&gt;And do you want it to let you enter the alias, say "AB" instead of "Block&lt;BR /&gt;1?"&lt;BR /&gt;If the program can translate the block name from the alias all the time,&lt;BR /&gt;then there's nothing extra to do.  Otherwise, you'll have to provide a list&lt;BR /&gt;of aliases for the real block names.  But will the program accept "Block 1"&lt;BR /&gt;instead of "AB?"&lt;BR /&gt;I mean, what if you enter an alias that is not paired with a real block&lt;BR /&gt;name, or what if the real block name doesn't exist in your drawing?</description>
      <pubDate>Fri, 19 Nov 2021 00:35:39 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/help-routine-from-another-lisp-routine/m-p/10767500#M52794</guid>
      <dc:creator>john.uhden</dc:creator>
      <dc:date>2021-11-19T00:35:39Z</dc:date>
    </item>
    <item>
      <title>Re: Help - Routine from another lisp routine.</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/help-routine-from-another-lisp-routine/m-p/10767607#M52795</link>
      <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/3930636"&gt;@john.uhden&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Yes, they are always the same blocks.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;If an alias is entered that does not belong to a block, the CD command gives an error and exits the command.&lt;BR /&gt;Aliases are AB, AC, AD, AE, AF.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I write the CD command in autocad.&lt;BR /&gt;I hit the Enter key.&lt;BR /&gt;It asks me to enter the alias of the symbol.&lt;BR /&gt;I write AB for example.&lt;BR /&gt;I hit the Enter key.&lt;/P&gt;&lt;P&gt;He shows me the block, puts the chrosshair and the rectangles with the coordinates.&lt;BR /&gt;I click on any part of the plane and insert the block that corresponds to the symbol of the alias "AB".&lt;BR /&gt;End of CD command.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have to do that with the four remaining aliases.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If I press the enter key again I get the CD command, with the last alias of the block that I enter "AB", if I press enter, I repeat the process that I previously explained, if I enter a new alias, the command repeats the process that I explained previously but shows me another block.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In the following image you can see what the CD command does when I run it for the first time.&lt;/P&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="arperezinf_lisp_funtion.png" style="width: 370px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/991546i2A3575C018C13572/image-size/large?v=v2&amp;amp;px=999" role="button" title="arperezinf_lisp_funtion.png" alt="arperezinf_lisp_funtion.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I started to think and something like this came out ... haha &lt;span class="lia-unicode-emoji" title=":rolling_on_the_floor_laughing:"&gt;🤣&lt;/span&gt;, but it doesn't work for me.&lt;span class="lia-unicode-emoji" title=":face_with_tears_of_joy:"&gt;😂&lt;/span&gt;&lt;span class="lia-unicode-emoji" title=":loudly_crying_face:"&gt;😭&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="lisp"&gt;(defun c: CDALL 
  ()
  ; I declare the aliases of the blocks.
  (setq Block1 "AB")
  (setq Block2 "AC")
  (setq Block3 "AD")
  (setq Block4 "AE")
  (setq Block5 "AF")
  (setq Ctn 0) ; counter starts at zero
  ; start loop of as many repetitions as blocks
  (repeat 5 
    (command "._CD" Block1 "") ; we call the CD command and it pass the alias of the blocks
    (setq Ctn     (+ Ctn 1) ; increment Ctn by 1
          (princ)
    )
  )&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you very much for reading my message.&lt;/P&gt;&lt;P&gt;Greetings.&lt;/P&gt;</description>
      <pubDate>Fri, 19 Nov 2021 12:02:01 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/help-routine-from-another-lisp-routine/m-p/10767607#M52795</guid>
      <dc:creator>arperezinf</dc:creator>
      <dc:date>2021-11-19T12:02:01Z</dc:date>
    </item>
    <item>
      <title>Re: Help - Routine from another lisp routine.</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/help-routine-from-another-lisp-routine/m-p/10768735#M52796</link>
      <description>&lt;P&gt;Okay, I think I've got it...&lt;/P&gt;
&lt;LI-CODE lang="general"&gt;(defun c:CD5 ()
  (foreach block '("AB" "AC" "AD" "AE" "AF")
    (command "_.CD" block pause)
  )
  (princ)
)&lt;/LI-CODE&gt;
&lt;P&gt;That should invoke the CD command 5 times, being once for each of the 5 blocks, each time pausing for you to pick the insertion point for each one.&lt;/P&gt;</description>
      <pubDate>Fri, 19 Nov 2021 13:23:05 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/help-routine-from-another-lisp-routine/m-p/10768735#M52796</guid>
      <dc:creator>john.uhden</dc:creator>
      <dc:date>2021-11-19T13:23:05Z</dc:date>
    </item>
    <item>
      <title>Re: Help - Routine from another lisp routine.</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/help-routine-from-another-lisp-routine/m-p/10768787#M52797</link>
      <description>&lt;P&gt;If CD does only what you describe, you probably don't need it.&amp;nbsp; I would modify&amp;nbsp;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/3930636"&gt;@john.uhden&lt;/a&gt;&amp;nbsp;'s suggestion:&lt;/P&gt;
&lt;LI-CODE lang="general"&gt;(defun c:CD5 ()
  (foreach block '("AB" "AC" "AD" "AE" "AF")
    (command "_.insert" block pause "" "" "")
  )
  (princ)
)&lt;/LI-CODE&gt;
&lt;P&gt;Remove one of the "" Enters if the Blocks are defined for uniform scaling.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 19 Nov 2021 13:32:33 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/help-routine-from-another-lisp-routine/m-p/10768787#M52797</guid>
      <dc:creator>Kent1Cooper</dc:creator>
      <dc:date>2021-11-19T13:32:33Z</dc:date>
    </item>
    <item>
      <title>Re: Help - Routine from another lisp routine.</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/help-routine-from-another-lisp-routine/m-p/10768884#M52798</link>
      <description>&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/69526"&gt;@Kent1Cooper&lt;/a&gt;&lt;BR /&gt;I think the OP has to use (or is used to using) his CD command primarily&lt;BR /&gt;because the aliases to the real block names are built in.  F'rinstance "AB"&lt;BR /&gt;is an alias for "Block 1" etc.  There are actually no blocks named "AB"&lt;BR /&gt;etc.  In fact the block definitions might not even be in the drawing, but&lt;BR /&gt;CD finds them wherever they are.  Plus I gather that his CD command takes&lt;BR /&gt;care of scaling and rotation.</description>
      <pubDate>Fri, 19 Nov 2021 14:12:39 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/help-routine-from-another-lisp-routine/m-p/10768884#M52798</guid>
      <dc:creator>john.uhden</dc:creator>
      <dc:date>2021-11-19T14:12:39Z</dc:date>
    </item>
    <item>
      <title>Re: Help - Routine from another lisp routine.</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/help-routine-from-another-lisp-routine/m-p/10769229#M52799</link>
      <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/69526"&gt;@Kent1Cooper&lt;/a&gt;&amp;nbsp;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/3930636"&gt;@john.uhden&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If the CD command handles scaling and rotation.&lt;/P&gt;&lt;P&gt;The CD5 lisp function works!!!&amp;nbsp;&lt;span class="lia-unicode-emoji" title=":grinning_face:"&gt;😀&lt;/span&gt;&lt;span class="lia-unicode-emoji" title=":folded_hands:"&gt;🙏&lt;/span&gt;&lt;span class="lia-unicode-emoji" title=":thumbs_up:"&gt;👍&lt;/span&gt;&lt;/P&gt;&lt;P&gt;But I get this message after I insert each block.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="general"&gt;Unknown command "CD5". Press F1 for help.&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I tried to rename the function but it does the same.&amp;nbsp;&lt;span class="lia-unicode-emoji" title=":frowning_face:"&gt;☹️&lt;/span&gt;&lt;span class="lia-unicode-emoji" title=":loudly_crying_face:"&gt;😭&lt;/span&gt;&lt;/P&gt;&lt;P&gt;It also shows this symbol when requesting the insertion point.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="arperezinf_lisp_function.png" style="width: 370px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/991686i177437AC9D489166/image-size/large?v=v2&amp;amp;px=999" role="button" title="arperezinf_lisp_function.png" alt="arperezinf_lisp_function.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;One detail, you can put a message before inserting each block that says something like this:&lt;/P&gt;&lt;P&gt;Inserting block (Block number) "Block aliases":&lt;/P&gt;&lt;P&gt;Example of the message: Inserting block1 "AB":&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you very much for reading my message.&lt;/P&gt;</description>
      <pubDate>Fri, 19 Nov 2021 16:53:06 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/help-routine-from-another-lisp-routine/m-p/10769229#M52799</guid>
      <dc:creator>arperezinf</dc:creator>
      <dc:date>2021-11-19T16:53:06Z</dc:date>
    </item>
  </channel>
</rss>

