<?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: How do I replace geometry in 2D cad in model space in AutoCAD Forum</title>
    <link>https://forums.autodesk.com/t5/autocad-forum/how-do-i-replace-geometry-in-2d-cad-in-model-space/m-p/10219420#M80568</link>
    <description>&lt;P&gt;If you don't have too many circle, then use insert a block of square at the center of the circle using osnap.&lt;/P&gt;
&lt;P&gt;if you have thousands of them then you need to use autolisp.&lt;/P&gt;
&lt;P&gt;&lt;A href="https://www.cadtutor.net/forum/topic/23034-replace-circle-by-block/" target="_blank"&gt;https://www.cadtutor.net/forum/topic/23034-replace-circle-by-block/&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 07 Apr 2021 17:24:21 GMT</pubDate>
    <dc:creator>Patchy</dc:creator>
    <dc:date>2021-04-07T17:24:21Z</dc:date>
    <item>
      <title>How do I replace geometry in 2D cad in model space</title>
      <link>https://forums.autodesk.com/t5/autocad-forum/how-do-i-replace-geometry-in-2d-cad-in-model-space/m-p/10219369#M80565</link>
      <description>&lt;P&gt;I am looking for a way to select similar geometry and replace it with something else. So if I have 12 circles in various locations in model space and I want to replace them with let's say a square. Can anyone assist, is it possible?&lt;/P&gt;</description>
      <pubDate>Wed, 07 Apr 2021 17:05:50 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/autocad-forum/how-do-i-replace-geometry-in-2d-cad-in-model-space/m-p/10219369#M80565</guid>
      <dc:creator>J.Sullivan</dc:creator>
      <dc:date>2021-04-07T17:05:50Z</dc:date>
    </item>
    <item>
      <title>Re: How do I replace geometry in 2D cad in model space</title>
      <link>https://forums.autodesk.com/t5/autocad-forum/how-do-i-replace-geometry-in-2d-cad-in-model-space/m-p/10219379#M80566</link>
      <description>&lt;P&gt;It's possible if you use autolisp. Put a point in center of the circle then replace that point with a square,&lt;/P&gt;
&lt;P&gt;then select similar of the circle or qselect and delete them.&lt;/P&gt;</description>
      <pubDate>Wed, 07 Apr 2021 17:17:13 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/autocad-forum/how-do-i-replace-geometry-in-2d-cad-in-model-space/m-p/10219379#M80566</guid>
      <dc:creator>Patchy</dc:creator>
      <dc:date>2021-04-07T17:17:13Z</dc:date>
    </item>
    <item>
      <title>Re: How do I replace geometry in 2D cad in model space</title>
      <link>https://forums.autodesk.com/t5/autocad-forum/how-do-i-replace-geometry-in-2d-cad-in-model-space/m-p/10219400#M80567</link>
      <description>can you explain in more detail I am forwarding this to a coworker&lt;BR /&gt;</description>
      <pubDate>Wed, 07 Apr 2021 17:16:23 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/autocad-forum/how-do-i-replace-geometry-in-2d-cad-in-model-space/m-p/10219400#M80567</guid>
      <dc:creator>J.Sullivan</dc:creator>
      <dc:date>2021-04-07T17:16:23Z</dc:date>
    </item>
    <item>
      <title>Re: How do I replace geometry in 2D cad in model space</title>
      <link>https://forums.autodesk.com/t5/autocad-forum/how-do-i-replace-geometry-in-2d-cad-in-model-space/m-p/10219420#M80568</link>
      <description>&lt;P&gt;If you don't have too many circle, then use insert a block of square at the center of the circle using osnap.&lt;/P&gt;
&lt;P&gt;if you have thousands of them then you need to use autolisp.&lt;/P&gt;
&lt;P&gt;&lt;A href="https://www.cadtutor.net/forum/topic/23034-replace-circle-by-block/" target="_blank"&gt;https://www.cadtutor.net/forum/topic/23034-replace-circle-by-block/&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 07 Apr 2021 17:24:21 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/autocad-forum/how-do-i-replace-geometry-in-2d-cad-in-model-space/m-p/10219420#M80568</guid>
      <dc:creator>Patchy</dc:creator>
      <dc:date>2021-04-07T17:24:21Z</dc:date>
    </item>
    <item>
      <title>Re: How do I replace geometry in 2D cad in model space</title>
      <link>https://forums.autodesk.com/t5/autocad-forum/how-do-i-replace-geometry-in-2d-cad-in-model-space/m-p/10219440#M80569</link>
      <description>there are quite a few I will try AutoLISP, ty&lt;BR /&gt;</description>
      <pubDate>Wed, 07 Apr 2021 17:29:22 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/autocad-forum/how-do-i-replace-geometry-in-2d-cad-in-model-space/m-p/10219440#M80569</guid>
      <dc:creator>J.Sullivan</dc:creator>
      <dc:date>2021-04-07T17:29:22Z</dc:date>
    </item>
    <item>
      <title>Re: How do I replace geometry in 2D cad in model space</title>
      <link>https://forums.autodesk.com/t5/autocad-forum/how-do-i-replace-geometry-in-2d-cad-in-model-space/m-p/10219487#M80570</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/2117670"&gt;@J.Sullivan&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;.... if I have 12 circles in various locations in model space and I want to replace them with let's say a square. ....&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;It depends on what you mean by that, in detail.&amp;nbsp; If you want to replace each selected Circle with a square as an orthogonal Polyline closed rectangle with its edge length the same as the Circle's diameter, this seems to do that:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;(defun C:C2S ; = Circle(s) {to} Square(s)
  (/ ss n cir cdata ctr rad)
  (if (not (setq ss (ssget "_I" '((0 . "CIRCLE"))))); use pre-selection if present
    (setq ss (ssget '((0 . "CIRCLE")))); if not, ask User
  ); if
  (if ss
    (repeat (setq n (sslength ss)) ; then
      (setq
        cir (ssname ss (setq n (1- n)))
        cdata (entget cir)
        ctr (cdr (assoc 10 cdata))
        rad (cdr (assoc 40 cdata))
      ); setq
      (command "_.rectang"
        "_non" (mapcar '- ctr (list rad rad))
        "_non" (mapcar '+ ctr (list rad rad))
        "_.matchprop" cir (entlast) "" ; for Layer, linetype, etc.
      ); command
      (entdel cir)
    ); repeat
  ); if
  (princ)
)&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you have a pre-selection including any Circle(s), it does those; if not, it asks you to select, and accepts only Circles in the selection.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;But maybe you want to replace all Circles, regardless of size, with the &lt;EM&gt;same size&lt;/EM&gt; square.&amp;nbsp; Or with squares of the same &lt;EM&gt;areas&lt;/EM&gt; as the Circles they replace.&amp;nbsp; Or maybe the square is a &lt;EM&gt;Block&lt;/EM&gt;.&amp;nbsp; Or maybe you want to replace all selected Circles collectively with &lt;EM&gt;one&lt;/EM&gt; square somehow [doesn't seem likely, but the wording would support that], in which case what would determine its size and location?&amp;nbsp; Or maybe you don't want the squares orthogonally oriented.&amp;nbsp; Or maybe you want the squares on the current Layer, regardless of the Circles' Layer(s).&amp;nbsp; Or maybe....&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 07 Apr 2021 17:54:45 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/autocad-forum/how-do-i-replace-geometry-in-2d-cad-in-model-space/m-p/10219487#M80570</guid>
      <dc:creator>Kent1Cooper</dc:creator>
      <dc:date>2021-04-07T17:54:45Z</dc:date>
    </item>
  </channel>
</rss>

