<?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: oldie but goody neds new shoes! in Visual LISP, AutoLISP and General Customization Forum</title>
    <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/oldie-but-goody-neds-new-shoes/m-p/8649140#M91879</link>
    <description>&lt;P&gt;You also can try this.......&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;(defun c:gb (/ cmd clay ent entlst nlay OLDLAYER SB)
 (setq cmd (getvar "cmdecho"))
 (while (/= "INSERT" (cdr (assoc 0 (entget (setq ent (car (entsel "\nSelect block to re-insert: ")))))))
        (prompt "\nThis entity is not a block!")
 )
 (if (= (cdr (assoc 0 (setq entlst (entget ent)))) "INSERT")
  (progn 
   (if (= :vlax-true (vla-get-IsDynamicBlock (vlax-ename-&amp;gt;vla-object ent)))
       (Setq SB (vla-get-Effectivename (vlax-ename-&amp;gt;vla-object (cdr (assoc -1 entlst)))))
       (Setq SB (cdr (assoc 2 entlst)))
   )
   (setvar "cmdecho" 1)
   (command "_.insert" SB "scale" (cdr (assoc 41 entlst)) pause pause)
   (setvar "cmdecho" 0)
   (command "_.chprop" (entlast) "" "LA" (cdr (assoc 8 entlst)) "")
  )
 )
 (setvar "cmdecho" cmd)
 (princ)
)&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 11 Mar 2019 08:24:15 GMT</pubDate>
    <dc:creator>dbhunia</dc:creator>
    <dc:date>2019-03-11T08:24:15Z</dc:date>
    <item>
      <title>oldie but goody neds new shoes!</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/oldie-but-goody-neds-new-shoes/m-p/8635638#M91876</link>
      <description>&lt;P&gt;I have a great little routine I've been using since the early nineties.&lt;/P&gt;
&lt;P&gt;It re-inserts blocks by picking the desired block. (matching layer, scale, etc).&lt;/P&gt;
&lt;P&gt;Works great, doesnt work on dynamic / anonymous blocks.&lt;/P&gt;
&lt;P&gt;Wondering if anyone out there has something similar that will work with regular blocks and dynamic blocks?&lt;/P&gt;
&lt;P&gt;Or if there is an easy solution to make this one work.&lt;/P&gt;
&lt;P&gt;I have attached lisp.&lt;/P&gt;</description>
      <pubDate>Mon, 04 Mar 2019 20:50:46 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/oldie-but-goody-neds-new-shoes/m-p/8635638#M91876</guid>
      <dc:creator>DC-MWA</dc:creator>
      <dc:date>2019-03-04T20:50:46Z</dc:date>
    </item>
    <item>
      <title>Re: oldie but goody neds new shoes!</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/oldie-but-goody-neds-new-shoes/m-p/8635817#M91877</link>
      <description>&lt;P&gt;Am I right that it's&amp;nbsp;Inserting another on the same Layer and at the same scale, with the only difference being a new insertion point and rotation?&amp;nbsp; How about just Copying it and Rotating the copy?&amp;nbsp; Minimally tested:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;(defun c:gb (/ ent entlst)&lt;BR /&gt;&amp;nbsp; (while (not (setq ent (entsel "\nSelect block to re-insert: "))))&lt;BR /&gt;&amp;nbsp; (setq entlst (entget (setq ent (car ent))))&lt;BR /&gt;&amp;nbsp; (if (= (cdr (assoc 0 entlst)) "INSERT")&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; (command ; then&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; "_.copy" ent "" "_none" (cdr (assoc 10 entlst)) pause&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; "_.rotate" "_last" "" "@" "_reference"&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; (angtos (cdr (assoc 50 entlst)) (getvar 'aunits) 8)&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; pause&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; ); command&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; (prompt "\nThis entity is not a block!"); else&lt;BR /&gt;&amp;nbsp; ); if&lt;BR /&gt;&amp;nbsp; (princ)&lt;BR /&gt;); defun&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 04 Mar 2019 22:10:04 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/oldie-but-goody-neds-new-shoes/m-p/8635817#M91877</guid>
      <dc:creator>Kent1Cooper</dc:creator>
      <dc:date>2019-03-04T22:10:04Z</dc:date>
    </item>
    <item>
      <title>Re: oldie but goody neds new shoes!</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/oldie-but-goody-neds-new-shoes/m-p/8644041#M91878</link>
      <description>&lt;P&gt;Sorry for delay. I just gt back to the office.&lt;/P&gt;
&lt;P&gt;Thanks for your time.&lt;/P&gt;
&lt;P&gt;I'll be back to "programming" this weekend.&lt;/P&gt;</description>
      <pubDate>Thu, 07 Mar 2019 20:55:17 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/oldie-but-goody-neds-new-shoes/m-p/8644041#M91878</guid>
      <dc:creator>DC-MWA</dc:creator>
      <dc:date>2019-03-07T20:55:17Z</dc:date>
    </item>
    <item>
      <title>Re: oldie but goody neds new shoes!</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/oldie-but-goody-neds-new-shoes/m-p/8649140#M91879</link>
      <description>&lt;P&gt;You also can try this.......&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;(defun c:gb (/ cmd clay ent entlst nlay OLDLAYER SB)
 (setq cmd (getvar "cmdecho"))
 (while (/= "INSERT" (cdr (assoc 0 (entget (setq ent (car (entsel "\nSelect block to re-insert: ")))))))
        (prompt "\nThis entity is not a block!")
 )
 (if (= (cdr (assoc 0 (setq entlst (entget ent)))) "INSERT")
  (progn 
   (if (= :vlax-true (vla-get-IsDynamicBlock (vlax-ename-&amp;gt;vla-object ent)))
       (Setq SB (vla-get-Effectivename (vlax-ename-&amp;gt;vla-object (cdr (assoc -1 entlst)))))
       (Setq SB (cdr (assoc 2 entlst)))
   )
   (setvar "cmdecho" 1)
   (command "_.insert" SB "scale" (cdr (assoc 41 entlst)) pause pause)
   (setvar "cmdecho" 0)
   (command "_.chprop" (entlast) "" "LA" (cdr (assoc 8 entlst)) "")
  )
 )
 (setvar "cmdecho" cmd)
 (princ)
)&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 11 Mar 2019 08:24:15 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/oldie-but-goody-neds-new-shoes/m-p/8649140#M91879</guid>
      <dc:creator>dbhunia</dc:creator>
      <dc:date>2019-03-11T08:24:15Z</dc:date>
    </item>
  </channel>
</rss>

