<?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: Keybord shortcut for Macro in Visual LISP, AutoLISP and General Customization Forum</title>
    <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/keybord-shortcut-for-macro/m-p/12399194#M21324</link>
    <description>&lt;P&gt;I have a &lt;FONT size="4"&gt;&lt;STRONG&gt;greatly simplifying&lt;/STRONG&gt;&lt;/FONT&gt; suggestion.&amp;nbsp; That linked routine and other suggestions at the same link get complicated by the fact that the original selection isn't what you want to Rotate after you've Copied it, but you want the results of the Copying, yet you can't know in defining the command how many there will be, so you have to find the newer things after Copying, or involve Groups or the Clipboard, or.....&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If, instead of COPYing the selection with a displacement, you COPY the original selection &lt;STRONG&gt;&lt;EM&gt;IN PLACE&lt;/EM&gt;&lt;/STRONG&gt;, then MOVE that original selection by the desired displacement, then very conveniently, &lt;EM&gt;both&lt;/EM&gt; what you want to MOVE &lt;EM&gt;and&lt;/EM&gt; what you then want to ROTATE is simply the &lt;STRONG&gt;P&lt;/STRONG&gt;revious selection, no matter how many objects it contains.&lt;/P&gt;
&lt;LI-CODE lang="general"&gt;(defun C:CR (/ ss)
  (prompt "\nTo Copy and then Rotate,")
  (if (setq ss (ssget "_:L"))
    (command ; then
      "_.copy" ss "" '(0 0) '(0 0); IN PLACE
      "_.move" "_previous" "" pause pause
      "_.rotate" "_previous" "" "@"
    ); command
  ); if
)&lt;/LI-CODE&gt;
&lt;P&gt;It leaves you at the point of specifying the rotation, around the same location relative to the objects that was used for the displacement.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Of course, it requires that it's OK for you to have the original selection end up in a different place, replaced in the original location by the results of the Copying.&amp;nbsp; You may have reason not to want that, for example if you have extended data attached to some of it, or other such complication.&lt;/P&gt;</description>
    <pubDate>Fri, 24 Nov 2023 23:04:13 GMT</pubDate>
    <dc:creator>Kent1Cooper</dc:creator>
    <dc:date>2023-11-24T23:04:13Z</dc:date>
    <item>
      <title>Keybord shortcut for Macro</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/keybord-shortcut-for-macro/m-p/12398654#M21319</link>
      <description>&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;I created this macro to copy rotate:&lt;/P&gt;&lt;P&gt;^C^C^]._MOCORO;_P;;\_C;\;_R;\;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;and i want to run it when i type in "cr" into the command line.&lt;/P&gt;&lt;P&gt;how do i do this?&lt;/P&gt;</description>
      <pubDate>Fri, 24 Nov 2023 16:05:03 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/keybord-shortcut-for-macro/m-p/12398654#M21319</guid>
      <dc:creator>lucasa8LZ6Q</dc:creator>
      <dc:date>2023-11-24T16:05:03Z</dc:date>
    </item>
    <item>
      <title>Re: Keybord shortcut for Macro</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/keybord-shortcut-for-macro/m-p/12398723#M21320</link>
      <description>&lt;P&gt;Or you&lt;EM&gt; adopted?&lt;/EM&gt; -- that's exactly the example macro &lt;A href="https://help.autodesk.com/view/ACD/2024/ENU/?guid=GUID-2BE0D656-7179-425D-8920-F8358929F797" target="_blank" rel="noopener"&gt;&amp;gt;here&amp;lt;&lt;/A&gt;.&amp;nbsp; Follow the instructions there to make a command of it.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You could also define such a command in AutoLisp, but it wouldn't be able to use MOCORO in a (command) function, since that takes only AutoCAD commands, and MOCORO is an Express Tool.&amp;nbsp; It would need to build the same functionality with a COPY and a ROTATE command.&lt;/P&gt;</description>
      <pubDate>Fri, 24 Nov 2023 16:49:10 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/keybord-shortcut-for-macro/m-p/12398723#M21320</guid>
      <dc:creator>Kent1Cooper</dc:creator>
      <dc:date>2023-11-24T16:49:10Z</dc:date>
    </item>
    <item>
      <title>Re: Keybord shortcut for Macro</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/keybord-shortcut-for-macro/m-p/12398734#M21321</link>
      <description>&lt;P&gt;hey, yes, thats how it was created.&lt;/P&gt;&lt;P&gt;and i made a button for it on my tool palette.&lt;/P&gt;&lt;P&gt;But i want it to run when i type CR.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;im not familiar with how to write the code for it in AutoLisp.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any advice?&lt;/P&gt;</description>
      <pubDate>Fri, 24 Nov 2023 16:56:58 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/keybord-shortcut-for-macro/m-p/12398734#M21321</guid>
      <dc:creator>lucasa8LZ6Q</dc:creator>
      <dc:date>2023-11-24T16:56:58Z</dc:date>
    </item>
    <item>
      <title>Re: Keybord shortcut for Macro</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/keybord-shortcut-for-macro/m-p/12398768#M21322</link>
      <description>&lt;DIV style="font-size: 1.1em; font-family: 'ArtifaktElement'; line-height: 1.3em; margin: 15px 100px 80px 100px;"&gt;
&lt;P&gt;Here is a starting point for the lisp version. Change C:COPYROT to C:CR&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://www.theswamp.org/index.php?topic=2787.msg35069#msg35069" target="_blank"&gt;https://www.theswamp.org/index.php?topic=2787.msg35069#msg35069&lt;/A&gt;&lt;/P&gt;
&lt;/DIV&gt;</description>
      <pubDate>Fri, 24 Nov 2023 17:16:03 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/keybord-shortcut-for-macro/m-p/12398768#M21322</guid>
      <dc:creator>rkmcswain</dc:creator>
      <dc:date>2023-11-24T17:16:03Z</dc:date>
    </item>
    <item>
      <title>Re: Keybord shortcut for Macro</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/keybord-shortcut-for-macro/m-p/12398806#M21323</link>
      <description>&lt;P&gt;Hey thank you so much, it worked!&lt;/P&gt;&lt;P&gt;Do you know the best place to go and learn this?&lt;/P&gt;&lt;P&gt;because i have other commands i want to do the same with. ie (move rotate, scale move, etc)&lt;/P&gt;</description>
      <pubDate>Fri, 24 Nov 2023 17:37:19 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/keybord-shortcut-for-macro/m-p/12398806#M21323</guid>
      <dc:creator>lucasa8LZ6Q</dc:creator>
      <dc:date>2023-11-24T17:37:19Z</dc:date>
    </item>
    <item>
      <title>Re: Keybord shortcut for Macro</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/keybord-shortcut-for-macro/m-p/12399194#M21324</link>
      <description>&lt;P&gt;I have a &lt;FONT size="4"&gt;&lt;STRONG&gt;greatly simplifying&lt;/STRONG&gt;&lt;/FONT&gt; suggestion.&amp;nbsp; That linked routine and other suggestions at the same link get complicated by the fact that the original selection isn't what you want to Rotate after you've Copied it, but you want the results of the Copying, yet you can't know in defining the command how many there will be, so you have to find the newer things after Copying, or involve Groups or the Clipboard, or.....&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If, instead of COPYing the selection with a displacement, you COPY the original selection &lt;STRONG&gt;&lt;EM&gt;IN PLACE&lt;/EM&gt;&lt;/STRONG&gt;, then MOVE that original selection by the desired displacement, then very conveniently, &lt;EM&gt;both&lt;/EM&gt; what you want to MOVE &lt;EM&gt;and&lt;/EM&gt; what you then want to ROTATE is simply the &lt;STRONG&gt;P&lt;/STRONG&gt;revious selection, no matter how many objects it contains.&lt;/P&gt;
&lt;LI-CODE lang="general"&gt;(defun C:CR (/ ss)
  (prompt "\nTo Copy and then Rotate,")
  (if (setq ss (ssget "_:L"))
    (command ; then
      "_.copy" ss "" '(0 0) '(0 0); IN PLACE
      "_.move" "_previous" "" pause pause
      "_.rotate" "_previous" "" "@"
    ); command
  ); if
)&lt;/LI-CODE&gt;
&lt;P&gt;It leaves you at the point of specifying the rotation, around the same location relative to the objects that was used for the displacement.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Of course, it requires that it's OK for you to have the original selection end up in a different place, replaced in the original location by the results of the Copying.&amp;nbsp; You may have reason not to want that, for example if you have extended data attached to some of it, or other such complication.&lt;/P&gt;</description>
      <pubDate>Fri, 24 Nov 2023 23:04:13 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/keybord-shortcut-for-macro/m-p/12399194#M21324</guid>
      <dc:creator>Kent1Cooper</dc:creator>
      <dc:date>2023-11-24T23:04:13Z</dc:date>
    </item>
  </channel>
</rss>

