<?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: insert and explode block lisp in Visual LISP, AutoLISP and General Customization Forum</title>
    <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/insert-and-explode-block-lisp/m-p/8374200#M97464</link>
    <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;@Anonymous&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;....&amp;nbsp; i would like to be asked the name of the block i want to use and for it to &lt;FONT color="#ff0000"&gt;retain that next time i use autocad&lt;/FONT&gt;. so i guess one command to run the settings part as well.&amp;nbsp;....&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;For &lt;FONT color="#ff0000"&gt;that&lt;/FONT&gt;, not just to retain it in the current editing session, probably the best thing is to use an &lt;FONT color="#000000"&gt;&lt;STRONG&gt;Environment Variable&lt;/STRONG&gt;&lt;/FONT&gt;, using the &lt;FONT color="#000000"&gt;(setenv)&lt;/FONT&gt; and &lt;FONT color="#000000"&gt;(getenv)&lt;/FONT&gt; functions.&amp;nbsp; One way, very lightly tested [&lt;FONT color="#3366ff"&gt;EDIT the blue parts&lt;/FONT&gt;]:&lt;/P&gt;
&lt;PRE&gt;(defun C:&lt;FONT color="#3366ff"&gt;YourCommandName&lt;/FONT&gt; (/ blk)
  (while
    (and
      (= "" ; empty string [Enter]
        (setq blk
          (getstring
            (strcat
              "\nBlock name &lt;FONT color="#3366ff"&gt;for whatever purposes this is&lt;/FONT&gt;"
              (if (get&lt;FONT color="#000000"&gt;&lt;STRONG&gt;env&lt;/STRONG&gt;&lt;/FONT&gt; "&lt;FONT color="#3366ff"&gt;YourCommandNameBlock&lt;/FONT&gt;")
                (strcat " &amp;lt;" (get&lt;FONT color="#000000"&gt;&lt;STRONG&gt;env&lt;/STRONG&gt;&lt;/FONT&gt; "&lt;FONT color="#3366ff"&gt;YourCommandNameBlock&lt;/FONT&gt;") "&amp;gt;"); then
                "" ; else -- no default offered if no prior value
              ); if
              ": "
            ); strcat
          ); getstring
        ); setq
      ); =
      (not (get&lt;STRONG&gt;&lt;FONT color="#000000"&gt;env&lt;/FONT&gt;&lt;/STRONG&gt; "&lt;FONT color="#3366ff"&gt;YourCommandNameBlock&lt;/FONT&gt;")); no prior value
    ); and
    (prompt "\nEnter not allowed --")
  ); while
  (set&lt;STRONG&gt;&lt;FONT color="#000000"&gt;env&lt;/FONT&gt;&lt;/STRONG&gt; "&lt;FONT color="#3366ff"&gt;YourCommandNameBlock&lt;/FONT&gt;"
    (if (= blk ""); Enter when allowed
      (get&lt;FONT color="#000000"&gt;&lt;STRONG&gt;env&lt;/STRONG&gt;&lt;/FONT&gt; "&lt;FONT color="#3366ff"&gt;YourCommandNameBlock&lt;/FONT&gt;"); then -- prior value
      blk ; else -- User input other than Enter
    ); if
  ); setenv
  (setvar "cmdecho" 0)
  (command
    "-insert" (get&lt;FONT color="#000000"&gt;&lt;STRONG&gt;env&lt;/STRONG&gt;&lt;/FONT&gt; "&lt;FONT color="#3366ff"&gt;YourCommandNameBlock&lt;/FONT&gt;")
      "_scale" (getvar "dimscale") "_rotate" 0 pause
    "explode" "last"
  ); command
  (setvar "cmdecho" 1)
  (princ)
); defun
&lt;/PRE&gt;
&lt;P&gt;"&lt;FONT color="#3366ff"&gt;YourCommandNameBlock&lt;/FONT&gt;" is the name of the environment variable.&amp;nbsp; Unlike an AutoLisp variable, it will remain.&amp;nbsp; Its name should include some aspect or abbreviation of whatever command name you use, so that it won't accidentally have conflicts with any other environment variables you may develop.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 01 Nov 2018 16:46:29 GMT</pubDate>
    <dc:creator>Kent1Cooper</dc:creator>
    <dc:date>2018-11-01T16:46:29Z</dc:date>
    <item>
      <title>insert and explode block lisp</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/insert-and-explode-block-lisp/m-p/8372485#M97455</link>
      <description>&lt;P&gt;I have a lisp where i am inserting a block and exploding it.&amp;nbsp; so what i done is put an * infront of the block o explode it.&amp;nbsp; when i insert it.&amp;nbsp; it will explode but it rotates the block slightly.&amp;nbsp; can anyone help.&amp;nbsp; see lisp below.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;(defun C:aa()&lt;BR /&gt;(setvar "cmdecho" 0)&lt;BR /&gt;(command "-insert" "*aa" pause&lt;BR /&gt;(getvar "dimscale")&lt;BR /&gt;(getvar "dimscale")&lt;BR /&gt;0&lt;BR /&gt;)&lt;BR /&gt;(setvar "cmdecho" 1)&lt;BR /&gt;(princ)&lt;BR /&gt;)&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;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 31 Oct 2018 22:55:39 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/insert-and-explode-block-lisp/m-p/8372485#M97455</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-10-31T22:55:39Z</dc:date>
    </item>
    <item>
      <title>Betreff: insert and explode block lisp</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/insert-and-explode-block-lisp/m-p/8372518#M97456</link>
      <description>&lt;P&gt;Set cmdecho to 1 in your lisp,&lt;/P&gt;
&lt;P&gt;run the command and check the textscreen[F2] what happen.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Can you see the problem?&lt;/P&gt;
&lt;P&gt;I guess your block aa is defined to 'scale uniformly' ? Then you will see that you put in a rotation of &amp;lt;whatever (getvar "dimscale") value is&amp;gt;&lt;/P&gt;
&lt;P&gt;and then you fire a "0" to the commandline, what isn't a command.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Without you file, hard to say..&lt;/P&gt;</description>
      <pubDate>Wed, 31 Oct 2018 23:22:47 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/insert-and-explode-block-lisp/m-p/8372518#M97456</guid>
      <dc:creator>cadffm</dc:creator>
      <dc:date>2018-10-31T23:22:47Z</dc:date>
    </item>
    <item>
      <title>Re: insert and explode block lisp</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/insert-and-explode-block-lisp/m-p/8372793#M97457</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Try this......&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;(defun C:aa()&lt;BR /&gt;(setvar "cmdecho" 0)&lt;BR /&gt;&lt;FONT color="#FF0000"&gt;(command "-insert" "aa" pause (getvar "dimscale") (getvar "dimscale") 0)&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#FF0000"&gt;(command "explode" (cdr (assoc -1 (entget (entlast)))));; To Explode either use this&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#FF0000"&gt;;(command "explode" (ssname (ssget "l") 0));; Or use this (ie. to Explode)&lt;/FONT&gt;&lt;BR /&gt;(setvar "cmdecho" 1)&lt;BR /&gt;(princ)&lt;BR /&gt;)&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 01 Nov 2018 05:13:28 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/insert-and-explode-block-lisp/m-p/8372793#M97457</guid>
      <dc:creator>dbhunia</dc:creator>
      <dc:date>2018-11-01T05:13:28Z</dc:date>
    </item>
    <item>
      <title>Re: insert and explode block lisp</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/insert-and-explode-block-lisp/m-p/8373314#M97458</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;@Anonymous&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;I have a lisp where i am inserting a block and exploding it.&amp;nbsp; so what i done is put an * infront of the block o explode it.&amp;nbsp; when i insert it.&amp;nbsp; it will explode but it rotates the block slightly. &amp;nbsp;….&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;When you INSERT something pre-exploded like that, it does not ask for both X and Y scale factors, but only for one scale factor, whether or not the Block is defined for uniform scaling.&amp;nbsp; It's taking your second scale-factor answer as the rotation angle.&amp;nbsp; Remove one of those&amp;nbsp;&lt;SPAN&gt;(getvar "dimscale")&lt;/SPAN&gt; entries.&lt;/P&gt;</description>
      <pubDate>Thu, 01 Nov 2018 11:29:49 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/insert-and-explode-block-lisp/m-p/8373314#M97458</guid>
      <dc:creator>Kent1Cooper</dc:creator>
      <dc:date>2018-11-01T11:29:49Z</dc:date>
    </item>
    <item>
      <title>Betreff: insert and explode block lisp</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/insert-and-explode-block-lisp/m-p/8373951#M97459</link>
      <description>&lt;P&gt;I remove the "*" and added an explode and it worked.&amp;nbsp; like below.&lt;/P&gt;&lt;P&gt;(defun C:aa()&lt;BR /&gt;(setvar "cmdecho" 0)&lt;BR /&gt;(command "-insert" "aa.dwg" pause&lt;BR /&gt;(getvar "dimscale")&lt;BR /&gt;(getvar "dimscale")&lt;BR /&gt;0&lt;BR /&gt;(command "explode" "last")&lt;BR /&gt;)&lt;BR /&gt;(setvar "cmdecho" 1)&lt;BR /&gt;(princ)&lt;BR /&gt;)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;thanks for pointing me in the right direction.&lt;/P&gt;</description>
      <pubDate>Thu, 01 Nov 2018 15:21:13 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/insert-and-explode-block-lisp/m-p/8373951#M97459</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-11-01T15:21:13Z</dc:date>
    </item>
    <item>
      <title>Re: insert and explode block lisp</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/insert-and-explode-block-lisp/m-p/8373975#M97460</link>
      <description>&lt;P&gt;Hi&amp;nbsp;dbhunia,&amp;nbsp; yours worked great too.&amp;nbsp; I figure it out with adding a explode command.&amp;nbsp; What i am trying to do here is create a second clipboard.&amp;nbsp; Is it possible to have two commands in one lisp?&amp;nbsp; i would like to be asked the name of the block i want to use and for it to retain that next time i use autocad. so i guess one command to run the settings part as well.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;thanks for the help&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 01 Nov 2018 15:27:51 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/insert-and-explode-block-lisp/m-p/8373975#M97460</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-11-01T15:27:51Z</dc:date>
    </item>
    <item>
      <title>Betreff: insert and explode block lisp</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/insert-and-explode-block-lisp/m-p/8374017#M97461</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;@Anonymous&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;I remove the "*" and added an explode and it worked.&amp;nbsp; ....&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Would you prefer to &lt;EM&gt;see it at dimscaled size&lt;/EM&gt;&amp;nbsp; as you place it?&amp;nbsp; That's something that you &lt;EM&gt;can't&lt;/EM&gt;&amp;nbsp; do if Inserting it pre-Exploded, so if you're going to Insert it first and then Explode it, you may as well take advantage of the option to drag it into place visually, at the intended size [and rotation].&amp;nbsp; If so, you can &lt;FONT color="#0000ff"&gt;give it the scale &lt;EM&gt;before&lt;/EM&gt;&amp;nbsp; &lt;/FONT&gt;the&lt;FONT color="#ff00ff"&gt; insertion point&lt;/FONT&gt;:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;(defun C:aa ()&lt;BR /&gt;&amp;nbsp; (setvar "cmdecho" 0)&lt;BR /&gt;&amp;nbsp; (command&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; "-insert" "aa" &lt;FONT color="#0000ff"&gt;"_scale" (getvar "dimscale")&lt;/FONT&gt; "_rotate" 0 &lt;FONT color="#ff00ff"&gt;pause&lt;/FONT&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; "explode" "last"&lt;BR /&gt;&amp;nbsp; )&lt;BR /&gt;&amp;nbsp; (setvar "cmdecho" 1)&lt;BR /&gt;&amp;nbsp; (princ)&lt;BR /&gt;)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;And in that situation, as with Inserting pre-Exploded, it asks for only one scale.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I took the .dwg off the aa, because &amp;nbsp;1)&amp;nbsp; it's not needed [it won't Insert any other kind of file], and&amp;nbsp; 2)&amp;nbsp; once the Block is in the drawing, when you use it again, it may as well just use it&amp;nbsp;from the Block definition that's now internal&amp;nbsp;to the drawing, rather than reaching outside to the drawing file again every time.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;[And I combined the two commands into &lt;EM&gt;one&lt;/EM&gt;&amp;nbsp; (command) function, which a lot of people apparently don't realize you can do.]&lt;/P&gt;</description>
      <pubDate>Thu, 01 Nov 2018 15:42:41 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/insert-and-explode-block-lisp/m-p/8374017#M97461</guid>
      <dc:creator>Kent1Cooper</dc:creator>
      <dc:date>2018-11-01T15:42:41Z</dc:date>
    </item>
    <item>
      <title>Re: insert and explode block lisp</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/insert-and-explode-block-lisp/m-p/8374028#M97462</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;As you asked.....&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;HR /&gt;@Anonymous&amp;nbsp;wrote:&lt;BR /&gt;&lt;P&gt;Hi&amp;nbsp;dbhunia,&amp;nbsp; yours worked great too.&amp;nbsp; I figure it out with adding a explode command.&amp;nbsp; What i am trying to do here is create a second clipboard.&amp;nbsp; Is it possible to have two commands in one lisp?&amp;nbsp; &lt;FONT color="#0000FF"&gt;i would like to be asked the name of the block&lt;/FONT&gt; i want to use and for it to retain that next time i use autocad. so i guess one command to run the settings part as well.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;..................&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Try this.....&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;(defun C:aa( / Blk)
(setvar "cmdecho" 0)
(or *userinput1*
(setq *userinput1* ""))
(setq *userinput1* (if (= "" (setq Blk (getstring T (strcat "\nEnter Block Name &amp;lt;" *userinput1* "&amp;gt;: "))))
      *userinput1*
Blk)&lt;BR /&gt;)
(command "-insert" Blk pause
(getvar "dimscale")
(getvar "dimscale")
0
(command "explode" "last")
)
(setvar "cmdecho" 1)
(princ)
)&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 01 Nov 2018 15:56:05 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/insert-and-explode-block-lisp/m-p/8374028#M97462</guid>
      <dc:creator>dbhunia</dc:creator>
      <dc:date>2018-11-01T15:56:05Z</dc:date>
    </item>
    <item>
      <title>Re: insert and explode block lisp</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/insert-and-explode-block-lisp/m-p/8374125#M97463</link>
      <description>&lt;P&gt;Hi dbhunia, that worked great but would&amp;nbsp;it possible for it to remember the block name that was picked so i dont have to enter it everytime.&amp;nbsp; thats what i was saying about a second command for the settings.&amp;nbsp; would this require a dcl file?&lt;/P&gt;</description>
      <pubDate>Thu, 01 Nov 2018 16:16:18 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/insert-and-explode-block-lisp/m-p/8374125#M97463</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-11-01T16:16:18Z</dc:date>
    </item>
    <item>
      <title>Re: insert and explode block lisp</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/insert-and-explode-block-lisp/m-p/8374200#M97464</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;@Anonymous&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;....&amp;nbsp; i would like to be asked the name of the block i want to use and for it to &lt;FONT color="#ff0000"&gt;retain that next time i use autocad&lt;/FONT&gt;. so i guess one command to run the settings part as well.&amp;nbsp;....&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;For &lt;FONT color="#ff0000"&gt;that&lt;/FONT&gt;, not just to retain it in the current editing session, probably the best thing is to use an &lt;FONT color="#000000"&gt;&lt;STRONG&gt;Environment Variable&lt;/STRONG&gt;&lt;/FONT&gt;, using the &lt;FONT color="#000000"&gt;(setenv)&lt;/FONT&gt; and &lt;FONT color="#000000"&gt;(getenv)&lt;/FONT&gt; functions.&amp;nbsp; One way, very lightly tested [&lt;FONT color="#3366ff"&gt;EDIT the blue parts&lt;/FONT&gt;]:&lt;/P&gt;
&lt;PRE&gt;(defun C:&lt;FONT color="#3366ff"&gt;YourCommandName&lt;/FONT&gt; (/ blk)
  (while
    (and
      (= "" ; empty string [Enter]
        (setq blk
          (getstring
            (strcat
              "\nBlock name &lt;FONT color="#3366ff"&gt;for whatever purposes this is&lt;/FONT&gt;"
              (if (get&lt;FONT color="#000000"&gt;&lt;STRONG&gt;env&lt;/STRONG&gt;&lt;/FONT&gt; "&lt;FONT color="#3366ff"&gt;YourCommandNameBlock&lt;/FONT&gt;")
                (strcat " &amp;lt;" (get&lt;FONT color="#000000"&gt;&lt;STRONG&gt;env&lt;/STRONG&gt;&lt;/FONT&gt; "&lt;FONT color="#3366ff"&gt;YourCommandNameBlock&lt;/FONT&gt;") "&amp;gt;"); then
                "" ; else -- no default offered if no prior value
              ); if
              ": "
            ); strcat
          ); getstring
        ); setq
      ); =
      (not (get&lt;STRONG&gt;&lt;FONT color="#000000"&gt;env&lt;/FONT&gt;&lt;/STRONG&gt; "&lt;FONT color="#3366ff"&gt;YourCommandNameBlock&lt;/FONT&gt;")); no prior value
    ); and
    (prompt "\nEnter not allowed --")
  ); while
  (set&lt;STRONG&gt;&lt;FONT color="#000000"&gt;env&lt;/FONT&gt;&lt;/STRONG&gt; "&lt;FONT color="#3366ff"&gt;YourCommandNameBlock&lt;/FONT&gt;"
    (if (= blk ""); Enter when allowed
      (get&lt;FONT color="#000000"&gt;&lt;STRONG&gt;env&lt;/STRONG&gt;&lt;/FONT&gt; "&lt;FONT color="#3366ff"&gt;YourCommandNameBlock&lt;/FONT&gt;"); then -- prior value
      blk ; else -- User input other than Enter
    ); if
  ); setenv
  (setvar "cmdecho" 0)
  (command
    "-insert" (get&lt;FONT color="#000000"&gt;&lt;STRONG&gt;env&lt;/STRONG&gt;&lt;/FONT&gt; "&lt;FONT color="#3366ff"&gt;YourCommandNameBlock&lt;/FONT&gt;")
      "_scale" (getvar "dimscale") "_rotate" 0 pause
    "explode" "last"
  ); command
  (setvar "cmdecho" 1)
  (princ)
); defun
&lt;/PRE&gt;
&lt;P&gt;"&lt;FONT color="#3366ff"&gt;YourCommandNameBlock&lt;/FONT&gt;" is the name of the environment variable.&amp;nbsp; Unlike an AutoLisp variable, it will remain.&amp;nbsp; Its name should include some aspect or abbreviation of whatever command name you use, so that it won't accidentally have conflicts with any other environment variables you may develop.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 01 Nov 2018 16:46:29 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/insert-and-explode-block-lisp/m-p/8374200#M97464</guid>
      <dc:creator>Kent1Cooper</dc:creator>
      <dc:date>2018-11-01T16:46:29Z</dc:date>
    </item>
    <item>
      <title>Re: insert and explode block lisp</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/insert-and-explode-block-lisp/m-p/8374223#M97465</link>
      <description>&lt;P&gt;that worked awesome.&amp;nbsp; &amp;nbsp;thanks so much for you help with this.&lt;/P&gt;</description>
      <pubDate>Thu, 01 Nov 2018 16:53:15 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/insert-and-explode-block-lisp/m-p/8374223#M97465</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-11-01T16:53:15Z</dc:date>
    </item>
  </channel>
</rss>

