<?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: Move Command in Visual LISP, AutoLISP and General Customization Forum</title>
    <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/move-command/m-p/6308552#M132413</link>
    <description>&lt;P&gt;Nvm read to fast, I should never post at work.&lt;/P&gt;</description>
    <pubDate>Wed, 04 May 2016 16:42:44 GMT</pubDate>
    <dc:creator>Satoews</dc:creator>
    <dc:date>2016-05-04T16:42:44Z</dc:date>
    <item>
      <title>Move Command</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/move-command/m-p/6308511#M132412</link>
      <description>&lt;P&gt;Pretty much a newby to AutoLISP, I have workd in several other languages, I think this is just a syntax issue but I cant seem to find the solution.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Object: a simple LISP routin that rund from inside blockeditor, it moves all enities within the block to be centered on 0,0,0 by doing that when it is finished the block insertation point will be the center of the bolck.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;here is my routine&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;(defun C:Myprog()&lt;BR /&gt;(command "_zoom" "extents")&lt;BR /&gt;(setq p1 (getvar "VIEWCTR"))&lt;BR /&gt;(setq ss1 (ssget "X"))&lt;BR /&gt;(command "_move" !ss1 "" !p1 "@0,0,0")&lt;BR /&gt;(princ)&lt;BR /&gt;)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;When I run the commands interactivly here is what I get&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Command: (command "_zoom" "extents")&lt;BR /&gt;_zoom&lt;BR /&gt;Specify corner of window, enter a scale factor (nX or nXP), or&lt;BR /&gt;[All/Center/Dynamic/Extents/Previous/Scale/Window/Object] &amp;lt;real time&amp;gt;: extents&lt;BR /&gt;Command: nil&lt;BR /&gt;Command: (setq p1 (getvar "VIEWCTR"))&lt;BR /&gt;(4.55988 6.96857 0.0)&lt;BR /&gt;Command: (setq ss1 (ssget "X"))&lt;BR /&gt;&amp;lt;Selection set: 228&amp;gt;&lt;BR /&gt;Command: (command "_move" !ss1 "" !p1 "@0,0,0")&lt;BR /&gt;_move&lt;BR /&gt;Select objects:&lt;BR /&gt;Command: @@0,0,0 Unknown command "@0,0,0". Press F1 for help&lt;BR /&gt;Command: nil&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The problem seems to be with entering "@0,0,0" and the final destination point of the move, I have tried several different variation but cant seem to find the correct syntax for enterint that point into the move command.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 04 May 2016 16:28:43 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/move-command/m-p/6308511#M132412</guid>
      <dc:creator>garyl</dc:creator>
      <dc:date>2016-05-04T16:28:43Z</dc:date>
    </item>
    <item>
      <title>Re: Move Command</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/move-command/m-p/6308552#M132413</link>
      <description>&lt;P&gt;Nvm read to fast, I should never post at work.&lt;/P&gt;</description>
      <pubDate>Wed, 04 May 2016 16:42:44 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/move-command/m-p/6308552#M132413</guid>
      <dc:creator>Satoews</dc:creator>
      <dc:date>2016-05-04T16:42:44Z</dc:date>
    </item>
    <item>
      <title>Re: Move Command</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/move-command/m-p/6308558#M132414</link>
      <description>!p1</description>
      <pubDate>Wed, 04 May 2016 16:42:37 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/move-command/m-p/6308558#M132414</guid>
      <dc:creator>garyl</dc:creator>
      <dc:date>2016-05-04T16:42:37Z</dc:date>
    </item>
    <item>
      <title>Re: Move Command</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/move-command/m-p/6308688#M132415</link>
      <description>&lt;P&gt;Like this... or just...&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;(defun C:Myprog ( / p1 ss1)
  (command "_zoom" "extents")
  (setq p1 (getvar "VIEWCTR"))
  (setq ss1 (ssget "X"))
  (command "_move" ss1 "" "_none" p1 "_none" "0,0,0")
  (princ)
  )

(defun C:Myprog2 nil
  (command "_.zoom" "_extents"
	   "_.move" (ssget "_X") "" "_none" (getvar 'VIEWCTR) "_none" "0,0,0")
  (princ)
)&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;Edit: it's important to turn the OSNAPs off. They are still running... you could get unexpected&amp;nbsp;result. Put "_none" in front of point inside of (command) function.&lt;/P&gt;</description>
      <pubDate>Wed, 04 May 2016 17:39:15 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/move-command/m-p/6308688#M132415</guid>
      <dc:creator>ВeekeeCZ</dc:creator>
      <dc:date>2016-05-04T17:39:15Z</dc:date>
    </item>
    <item>
      <title>Re: Move Command</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/move-command/m-p/6308707#M132416</link>
      <description>&lt;P&gt;Related to Beekee's post, &amp;nbsp;you only include the exclamation point when accessing lisp symbol values from the command line, not within the command function. &amp;nbsp;Also, the entry "@0,0,0" would move it nowhere from the last point. &amp;nbsp;As Beekee did, the point would be entered without the&amp;nbsp;@ symbol.&lt;/P&gt;</description>
      <pubDate>Wed, 04 May 2016 17:39:05 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/move-command/m-p/6308707#M132416</guid>
      <dc:creator>dbroad</dc:creator>
      <dc:date>2016-05-04T17:39:05Z</dc:date>
    </item>
    <item>
      <title>Re: Move Command</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/move-command/m-p/6308723#M132417</link>
      <description>that works, I like the shortened version too.&lt;BR /&gt;&lt;BR /&gt;Thanks</description>
      <pubDate>Wed, 04 May 2016 17:43:33 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/move-command/m-p/6308723#M132417</guid>
      <dc:creator>garyl</dc:creator>
      <dc:date>2016-05-04T17:43:33Z</dc:date>
    </item>
  </channel>
</rss>

