<?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: Moving all objects to 0,0 using a script in AutoCAD Forum</title>
    <link>https://forums.autodesk.com/t5/autocad-forum/moving-all-objects-to-0-0-using-a-script/m-p/9481730#M106017</link>
    <description>&lt;P&gt;Whats the difference in your case (object selection ALL)??&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;But I wrote about&amp;nbsp; Extents and Treedepth because of i was searching for your problem.&lt;/P&gt;
&lt;P&gt;( at this point i didn't read that my other post&amp;nbsp; about object snaps was the solution for you)&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;Why treedepth: Because the value of Exmin/Extmax is often wrong!!&lt;/P&gt;
&lt;P&gt;The workaround is to re-set treedepth.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;In a standard/automation process you have to make sure that what you do will ever works fine,&lt;/P&gt;
&lt;P&gt;in case of your script you should add the treedepth statement in front of your move-statement.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Your welcome&lt;/P&gt;</description>
    <pubDate>Thu, 30 Apr 2020 06:40:33 GMT</pubDate>
    <dc:creator>cadffm</dc:creator>
    <dc:date>2020-04-30T06:40:33Z</dc:date>
    <item>
      <title>Moving all objects to 0,0 using a script</title>
      <link>https://forums.autodesk.com/t5/autocad-forum/moving-all-objects-to-0-0-using-a-script/m-p/9480896#M106007</link>
      <description>&lt;P&gt;I have a bunch of drawings where a previous colleague did not follow design standards and the title blocks are all over the place. I am attempting to write a script that will select all the objects on the drawing and move them to 0,0 with the first point being relative to the lower left corner of the title block. (FYI, there are no blocks in these drawings. The titleblock itself is just lines and text; another thing I want to fix.)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I found these lines which get me very close:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN style="display: inline !important; float: none; background-color: #fef3e3; color: #666666; font-family: 'Artifakt',Tahoma,Helvetica,Arial,sans-serif; font-size: 14px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; overflow-wrap: break-word; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-space: normal; word-spacing: 0px;"&gt;(command "zoom" "object" "all" "") &lt;/SPAN&gt;&lt;BR style="box-sizing: border-box; color: #666666; font-family: &amp;amp;quot; artifakt&amp;amp;quot;,tahoma,helvetica,arial,sans-serif; font-size: 14px; font-style: normal; font-variant: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-space: normal; word-spacing: 0px;" /&gt;&lt;SPAN style="display: inline !important; float: none; background-color: #fef3e3; color: #666666; font-family: 'Artifakt',Tahoma,Helvetica,Arial,sans-serif; font-size: 14px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; overflow-wrap: break-word; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-space: normal; word-spacing: 0px;"&gt; (command "move" "all" "" (getvar "extmin") '(0 0))&lt;/SPAN&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The problem I am having I think has to do with the BASE value.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;After running the above lines the titleblock are located at -0.25,-0.25. I discovered that the base was set to -0.25,-0.25. This should be simple; I set BASE to 0,0 and tried the above again. No change. Nothing I do seems to have any affect. If I start a new drawing and throw some objects on it and run the above code, everything works as expected.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I feel that this should have been a slam dunk but am stymied as to why I cannot get rid of this offset.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Does anyone have any clues?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks in advance for any help.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 29 Apr 2020 20:34:34 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/autocad-forum/moving-all-objects-to-0-0-using-a-script/m-p/9480896#M106007</guid>
      <dc:creator>testsubject</dc:creator>
      <dc:date>2020-04-29T20:34:34Z</dc:date>
    </item>
    <item>
      <title>Re: Moving all objects to 0,0 using a script</title>
      <link>https://forums.autodesk.com/t5/autocad-forum/moving-all-objects-to-0-0-using-a-script/m-p/9480912#M106008</link>
      <description>&lt;P&gt;Try and use the "Flatten" command. HTH&lt;/P&gt;</description>
      <pubDate>Wed, 29 Apr 2020 20:46:20 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/autocad-forum/moving-all-objects-to-0-0-using-a-script/m-p/9480912#M106008</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-04-29T20:46:20Z</dc:date>
    </item>
    <item>
      <title>Betreff: Moving all objects to 0,0 using a script</title>
      <link>https://forums.autodesk.com/t5/autocad-forum/moving-all-objects-to-0-0-using-a-script/m-p/9480932#M106009</link>
      <description>&lt;P&gt;1. Handle your objectsnap, use "_none" in front of your coordinates.&lt;/P&gt;
&lt;P&gt;Or in your case: Use "_END" in front of the first coordinate (your (getvar "extmin") statement, and "_None" in front of the 0,0,0&lt;/P&gt;
&lt;P&gt;2. As first step set your UCS to world&lt;/P&gt;
&lt;P&gt;3. Offtopic: Base set the basepoint for this DWG, nothing to do with things inside this DWG (just important for inserting this dwg to another file by Insert as Block or Xref.)&lt;/P&gt;
&lt;P&gt;If you don't why you set the base (insbase), use 0,0,0 wcs coordinates as insbase setting.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 29 Apr 2020 20:58:16 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/autocad-forum/moving-all-objects-to-0-0-using-a-script/m-p/9480932#M106009</guid>
      <dc:creator>cadffm</dc:creator>
      <dc:date>2020-04-29T20:58:16Z</dc:date>
    </item>
    <item>
      <title>Re: Moving all objects to 0,0 using a script</title>
      <link>https://forums.autodesk.com/t5/autocad-forum/moving-all-objects-to-0-0-using-a-script/m-p/9480953#M106010</link>
      <description>&lt;P&gt;Try to do a google search for a lsp program called "Zero.lsp". It would flatten all entities in a drawing.&lt;/P&gt;</description>
      <pubDate>Wed, 29 Apr 2020 21:04:08 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/autocad-forum/moving-all-objects-to-0-0-using-a-script/m-p/9480953#M106010</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-04-29T21:04:08Z</dc:date>
    </item>
    <item>
      <title>Re: Moving all objects to 0,0 using a script</title>
      <link>https://forums.autodesk.com/t5/autocad-forum/moving-all-objects-to-0-0-using-a-script/m-p/9480980#M106011</link>
      <description>&lt;P&gt;Thanks for the suggestion but that did not do it.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I even erased every thing from the drawing, purged and then just drew 3 simple object;&amp;nbsp; Rectangle, circle, and Line.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I then did the zoom and move command strings and still have the&amp;nbsp; same thing. The EXTMIN is being offset by 0.25,0.25 from where it should be.&lt;/P&gt;</description>
      <pubDate>Wed, 29 Apr 2020 21:13:26 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/autocad-forum/moving-all-objects-to-0-0-using-a-script/m-p/9480980#M106011</guid>
      <dc:creator>testsubject</dc:creator>
      <dc:date>2020-04-29T21:13:26Z</dc:date>
    </item>
    <item>
      <title>Re: Moving all objects to 0,0 using a script</title>
      <link>https://forums.autodesk.com/t5/autocad-forum/moving-all-objects-to-0-0-using-a-script/m-p/9480984#M106012</link>
      <description>&lt;P&gt;@Anonymous&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Both hints are only for elevation/Z-Position, not to move objects from X,Y to 0,0&lt;/P&gt;</description>
      <pubDate>Wed, 29 Apr 2020 21:13:44 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/autocad-forum/moving-all-objects-to-0-0-using-a-script/m-p/9480984#M106012</guid>
      <dc:creator>cadffm</dc:creator>
      <dc:date>2020-04-29T21:13:44Z</dc:date>
    </item>
    <item>
      <title>Betreff: Moving all objects to 0,0 using a script</title>
      <link>https://forums.autodesk.com/t5/autocad-forum/moving-all-objects-to-0-0-using-a-script/m-p/9481005#M106013</link>
      <description>&lt;P&gt;Sebastian,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;#2 was the problem. The USC was set to *NO NAME*. As soon as I set it to World everything works as expected.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN style="display: inline !important; float: none; background-color: #ffffff; color: #666666; cursor: text; font-family: inherit; font-size: 16px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 1.7142; orphans: 2; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-space: normal; word-spacing: 0px;"&gt;I knew it had to be something simple. &lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN style="display: inline !important; float: none; background-color: #ffffff; color: #666666; cursor: text; font-family: inherit; font-size: 16px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 1.7142; orphans: 2; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-space: normal; word-spacing: 0px;"&gt;Thanks so much!&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 29 Apr 2020 21:18:04 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/autocad-forum/moving-all-objects-to-0-0-using-a-script/m-p/9481005#M106013</guid>
      <dc:creator>testsubject</dc:creator>
      <dc:date>2020-04-29T21:18:04Z</dc:date>
    </item>
    <item>
      <title>Re: Moving all objects to 0,0 using a script</title>
      <link>https://forums.autodesk.com/t5/autocad-forum/moving-all-objects-to-0-0-using-a-script/m-p/9481016#M106014</link>
      <description>&lt;P&gt;My bad, thought you wanted to remove the z values.&amp;nbsp; Wow someone really jacked up a drawing.&amp;nbsp; You could try a select similiar and change the x and y values in your properties box.&amp;nbsp; It may help saving some stuff if its in the rightful place.&lt;/P&gt;</description>
      <pubDate>Wed, 29 Apr 2020 21:20:08 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/autocad-forum/moving-all-objects-to-0-0-using-a-script/m-p/9481016#M106014</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-04-29T21:20:08Z</dc:date>
    </item>
    <item>
      <title>Re: Moving all objects to 0,0 using a script</title>
      <link>https://forums.autodesk.com/t5/autocad-forum/moving-all-objects-to-0-0-using-a-script/m-p/9481026#M106015</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/58595"&gt;@testsubject&lt;/a&gt;&amp;nbsp; schrieb:&lt;BR /&gt;
&lt;P&gt;I then did the zoom and move command strings and still have the&amp;nbsp; same thing. &lt;STRONG&gt;The EXTMIN is being offset by 0.25,0.25 from where it should be.&lt;/STRONG&gt;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Extmin is not exactly what you thing, it is not reading your object properties, but please try this:&lt;/P&gt;
&lt;P&gt;Run your ZOOM EXTENTS&lt;/P&gt;
&lt;P&gt;then set treedepth, for example by using the following line:&lt;/P&gt;
&lt;P&gt;(setvar "treedepth" (getvar "treedepth"))&lt;/P&gt;
&lt;P&gt;then use EXTMIN&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Is it better now?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 29 Apr 2020 21:22:21 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/autocad-forum/moving-all-objects-to-0-0-using-a-script/m-p/9481026#M106015</guid>
      <dc:creator>cadffm</dc:creator>
      <dc:date>2020-04-29T21:22:21Z</dc:date>
    </item>
    <item>
      <title>Re: Moving all objects to 0,0 using a script</title>
      <link>https://forums.autodesk.com/t5/autocad-forum/moving-all-objects-to-0-0-using-a-script/m-p/9481445#M106016</link>
      <description>&lt;P&gt;Sebastian,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I realize that extmin returns the Extents minimum coordinates. For what I am doing this is fine. I am doing Zoom Object; not Zoom Extents.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks for your help.&lt;/P&gt;</description>
      <pubDate>Thu, 30 Apr 2020 02:10:06 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/autocad-forum/moving-all-objects-to-0-0-using-a-script/m-p/9481445#M106016</guid>
      <dc:creator>testsubject</dc:creator>
      <dc:date>2020-04-30T02:10:06Z</dc:date>
    </item>
    <item>
      <title>Re: Moving all objects to 0,0 using a script</title>
      <link>https://forums.autodesk.com/t5/autocad-forum/moving-all-objects-to-0-0-using-a-script/m-p/9481730#M106017</link>
      <description>&lt;P&gt;Whats the difference in your case (object selection ALL)??&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;But I wrote about&amp;nbsp; Extents and Treedepth because of i was searching for your problem.&lt;/P&gt;
&lt;P&gt;( at this point i didn't read that my other post&amp;nbsp; about object snaps was the solution for you)&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;Why treedepth: Because the value of Exmin/Extmax is often wrong!!&lt;/P&gt;
&lt;P&gt;The workaround is to re-set treedepth.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;In a standard/automation process you have to make sure that what you do will ever works fine,&lt;/P&gt;
&lt;P&gt;in case of your script you should add the treedepth statement in front of your move-statement.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Your welcome&lt;/P&gt;</description>
      <pubDate>Thu, 30 Apr 2020 06:40:33 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/autocad-forum/moving-all-objects-to-0-0-using-a-script/m-p/9481730#M106017</guid>
      <dc:creator>cadffm</dc:creator>
      <dc:date>2020-04-30T06:40:33Z</dc:date>
    </item>
    <item>
      <title>Re: Moving all objects to 0,0 using a script</title>
      <link>https://forums.autodesk.com/t5/autocad-forum/moving-all-objects-to-0-0-using-a-script/m-p/9482291#M106018</link>
      <description>&lt;P&gt;Thank you for the suggestion. I will give it a try.&lt;/P&gt;</description>
      <pubDate>Thu, 30 Apr 2020 11:03:53 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/autocad-forum/moving-all-objects-to-0-0-using-a-script/m-p/9482291#M106018</guid>
      <dc:creator>testsubject</dc:creator>
      <dc:date>2020-04-30T11:03:53Z</dc:date>
    </item>
    <item>
      <title>Re: Moving all objects to 0,0 using a script</title>
      <link>https://forums.autodesk.com/t5/autocad-forum/moving-all-objects-to-0-0-using-a-script/m-p/12986761#M106019</link>
      <description>Bob,&lt;BR /&gt;Just used your move command. Still works great in 2025 AutoCAD!!&lt;BR /&gt;We started about the same time with AutoCAD. Bendix was a test station for AutoCAD so I got lucky to be working there at the time. 35,000 desk tops. But beats the mainframes they used that was 80,000 per user for the warranty back then and raised air conditioned floors and computer room.&lt;BR /&gt;Thanks, JRR.&lt;BR /&gt;</description>
      <pubDate>Wed, 28 Aug 2024 14:47:19 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/autocad-forum/moving-all-objects-to-0-0-using-a-script/m-p/12986761#M106019</guid>
      <dc:creator>jreidKVSUZ</dc:creator>
      <dc:date>2024-08-28T14:47:19Z</dc:date>
    </item>
  </channel>
</rss>

