<?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: Help: Making a Button/Macro in AutoCAD Forum</title>
    <link>https://forums.autodesk.com/t5/autocad-forum/help-making-a-button-macro/m-p/7016482#M231168</link>
    <description>&lt;P&gt;Welcome! Good luck. Glad the WBlock command worked out for you. It is a lot cleaner to just use AutoCAD when you can.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Give the AutoLISP code a try. It is just a quick run in it for you to let you try it a little and start to learn.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Good luck.&lt;/P&gt;</description>
    <pubDate>Fri, 14 Apr 2017 03:06:12 GMT</pubDate>
    <dc:creator>SeeMSixty7</dc:creator>
    <dc:date>2017-04-14T03:06:12Z</dc:date>
    <item>
      <title>Help: Making a Button/Macro</title>
      <link>https://forums.autodesk.com/t5/autocad-forum/help-making-a-button-macro/m-p/7015674#M231162</link>
      <description>&lt;P&gt;I need help making my first button/macro.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have something I have to do often,&lt;/P&gt;&lt;P&gt;Copy something from one drawing, goto a new blank drawing, paste it, set it to layer 0, and save-as that drawing.&lt;/P&gt;&lt;P&gt;(I am making drawing files that contain single parts to be cut on a plasma table)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;What I would like, is a button/macro that can do the following in one simple click.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;1. delete everything currently&amp;nbsp;on drawing&lt;/P&gt;&lt;P&gt;2. paste previously copied item&lt;/P&gt;&lt;P&gt;3. select all&lt;/P&gt;&lt;P&gt;4. set to layer 0, and color by layer&lt;/P&gt;&lt;P&gt;5. zoom extents&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks in advance&lt;/P&gt;&lt;P&gt;~John&lt;/P&gt;</description>
      <pubDate>Thu, 13 Apr 2017 18:21:54 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/autocad-forum/help-making-a-button-macro/m-p/7015674#M231162</guid>
      <dc:creator>johntrotto</dc:creator>
      <dc:date>2017-04-13T18:21:54Z</dc:date>
    </item>
    <item>
      <title>Re: Help: Making a Button/Macro</title>
      <link>https://forums.autodesk.com/t5/autocad-forum/help-making-a-button-macro/m-p/7015760#M231163</link>
      <description>&lt;P&gt;Instead of pasting into a new drawing just work in the source drawing. Simply block the entities that you used to copy, then bedit the block, change all to layer zero, then wblock the block and you are done.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;A single command could be written to do that pretty easily. Here is just a quick one for you. You may want to consider adding in color and linetype bylayer.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;(defun c:NDF()
	(setq newfilename (getstring "\nBlock Name: "))
	(if (/= newfilename "")
		(progn
			(setq myss (ssget))
			(if myss
				(progn
					(while (not (setq newinspoint (getpoint "\nInsertion Point: "))))
					(princ)
					(command "change" myss "" "P" "La" "0" "")
					(command "-wblock" (strcat (getvar "dwgprefix") newfilename) "" newinspoint myss "")
				)
			)
		)
	)
)&lt;/PRE&gt;</description>
      <pubDate>Thu, 13 Apr 2017 19:00:01 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/autocad-forum/help-making-a-button-macro/m-p/7015760#M231163</guid>
      <dc:creator>SeeMSixty7</dc:creator>
      <dc:date>2017-04-13T19:00:01Z</dc:date>
    </item>
    <item>
      <title>Re: Help: Making a Button/Macro</title>
      <link>https://forums.autodesk.com/t5/autocad-forum/help-making-a-button-macro/m-p/7015779#M231164</link>
      <description>&lt;P&gt;Im not sure that will work for my needs?&lt;/P&gt;&lt;P&gt;Our plasma table has to open a dwg or dxf that one one part on it, in layer 0, nothing else.&lt;BR /&gt;There is a limited interface, so I dont think the operator can do much of anything except load a drawing.&lt;/P&gt;&lt;P&gt;Thats why I have to take individual plates off of a drawing, and make a new drawing for each, containing just that one plate.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Or, does what you are saying, make a new drawing out of what is blocked?&lt;/P&gt;</description>
      <pubDate>Thu, 13 Apr 2017 19:10:46 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/autocad-forum/help-making-a-button-macro/m-p/7015779#M231164</guid>
      <dc:creator>johntrotto</dc:creator>
      <dc:date>2017-04-13T19:10:46Z</dc:date>
    </item>
    <item>
      <title>Re: Help: Making a Button/Macro</title>
      <link>https://forums.autodesk.com/t5/autocad-forum/help-making-a-button-macro/m-p/7015835#M231165</link>
      <description>&lt;P&gt;Yes it makes a completely new drawing file containing only what you selected. As a result it also removes it from the source drawing so if you want it back simply use the OOPS command to get it back.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 13 Apr 2017 19:33:44 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/autocad-forum/help-making-a-button-macro/m-p/7015835#M231165</guid>
      <dc:creator>SeeMSixty7</dc:creator>
      <dc:date>2017-04-13T19:33:44Z</dc:date>
    </item>
    <item>
      <title>Re: Help: Making a Button/Macro</title>
      <link>https://forums.autodesk.com/t5/autocad-forum/help-making-a-button-macro/m-p/7015868#M231166</link>
      <description>&lt;P&gt;What SeeMSixty7 post, ist a programm-code, written in LISP.&lt;BR /&gt;&lt;BR /&gt;Copy the code in a (text)editor, save or rename the file to "NDF.LSP" (not NDF.txt),&lt;BR /&gt;Then use &lt;A href="http://help.autodesk.com/view/ACD/2018/ENU/?guid=GUID-47621BB1-F29D-4A69-9C99-A6E1495FBA38" target="_self"&gt;command APPLOAD&lt;/A&gt; or Drag´n´drop the file to your drawing&lt;BR /&gt;Start the new command: NDF&lt;BR /&gt;(its very simple rudimentary, just an example for start coding)&lt;BR /&gt;&lt;BR /&gt;--&lt;BR /&gt;&lt;BR /&gt;"I need help making my first button/macro."&lt;BR /&gt;Really a menumacro? Which product/version?&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;"I have something I have to do often,&lt;BR /&gt;Copy something from one drawing, goto a new blank drawing, paste it, set it to layer 0, and save-as that drawing."&lt;BR /&gt;Menumacros can only work in the active file, but with WBLOCK or EXPORT you have two other commands to create new files.&lt;BR /&gt;&lt;BR /&gt;Example1&lt;BR /&gt;1)Select Objects 2) Edit Objects 3) create a new file with WBlock 4) Undo the Changes in the active file.&lt;/P&gt;&lt;PRE&gt;^C^C_LAYER;_unlock;*;;_PICKADD;2;_SELECT;\_CHANGE;_p;_layer;0;_color;ByLayer;;_UCS;_w;_EXPORT;~;;0,0,0;_p;;_UNDO;5&lt;/PRE&gt;&lt;P&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;What I would like, is a button/macro that can do the following in one simple click.&lt;BR /&gt;1. delete everything currently on drawing&lt;BR /&gt;2. paste previously copied item&lt;BR /&gt;3. select all&lt;BR /&gt;4. set to layer 0, and color by layer&lt;BR /&gt;5. zoom extents"&lt;BR /&gt;&lt;BR /&gt;Thats possible too, but there isnt a way to delete unknown Layouts without using Lisp or VBA&lt;BR /&gt;&lt;BR /&gt;Example2&lt;/P&gt;&lt;PRE&gt;^C^C_LAYER;_unlock;*;;_PICKADD;2;_SELECT;\_LAYER;_th;*;;_ERASE;_all;_r;_p;;_CHANGE;_all;;_p;_layer;0;_color;ByLayer;;_LAYER;_s;0;;_PURGE;_all;*;_no;_SAVEAS;&lt;/PRE&gt;&lt;P&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://help.autodesk.com/view/ACD/2018/ENU/?guid=GUID-D991386C-FBAA-4094-9FCB-AADD98ACD3EF" target="_self"&gt;About Command Macros&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://help.autodesk.com/view/ACD/2018/ENU/?guid=GUID-DDDB6E26-75E1-4643-8C6A-BEAEBA83A424" target="_self"&gt;About Special Control Characters in Command Macros (like ^C ; and \)&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://help.autodesk.com/view/ACD/2018/ENU/?page=commands" target="_self"&gt;all other input: normal AutoCAD-Commands&lt;/A&gt;&lt;BR /&gt;&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;The best solution is a programm in Lisp/VBA/c++/.net, that can handle errors and so on, but you ask for a macro - you´re welcome &lt;span class="lia-unicode-emoji" title=":winking_face:"&gt;😉&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 13 Apr 2017 19:47:24 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/autocad-forum/help-making-a-button-macro/m-p/7015868#M231166</guid>
      <dc:creator>cadffm</dc:creator>
      <dc:date>2017-04-13T19:47:24Z</dc:date>
    </item>
    <item>
      <title>Re: Help: Making a Button/Macro</title>
      <link>https://forums.autodesk.com/t5/autocad-forum/help-making-a-button-macro/m-p/7015931#M231167</link>
      <description>&lt;P&gt;Thanks alot, I didnt know about wblock, I found a decent way of doing it with just that command,&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks !&lt;/P&gt;</description>
      <pubDate>Thu, 13 Apr 2017 20:13:10 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/autocad-forum/help-making-a-button-macro/m-p/7015931#M231167</guid>
      <dc:creator>johntrotto</dc:creator>
      <dc:date>2017-04-13T20:13:10Z</dc:date>
    </item>
    <item>
      <title>Re: Help: Making a Button/Macro</title>
      <link>https://forums.autodesk.com/t5/autocad-forum/help-making-a-button-macro/m-p/7016482#M231168</link>
      <description>&lt;P&gt;Welcome! Good luck. Glad the WBlock command worked out for you. It is a lot cleaner to just use AutoCAD when you can.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Give the AutoLISP code a try. It is just a quick run in it for you to let you try it a little and start to learn.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Good luck.&lt;/P&gt;</description>
      <pubDate>Fri, 14 Apr 2017 03:06:12 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/autocad-forum/help-making-a-button-macro/m-p/7016482#M231168</guid>
      <dc:creator>SeeMSixty7</dc:creator>
      <dc:date>2017-04-14T03:06:12Z</dc:date>
    </item>
    <item>
      <title>Re: Help: Making a Button/Macro</title>
      <link>https://forums.autodesk.com/t5/autocad-forum/help-making-a-button-macro/m-p/7018455#M231169</link>
      <description>&lt;P&gt;HI&lt;/P&gt;
&lt;P&gt;You can do all that which you want on&amp;nbsp;" Action Record Macro" and do all what you want , then stop macro ,&lt;/P&gt;
&lt;P&gt;that's all .&lt;/P&gt;
&lt;P&gt;I am sending a pic from that macro ,(just click play bot.),and it will do all things which you asked for it.&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Capture1.PNG" style="width: 313px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/345034iD484F8809E096AE3/image-size/large?v=v2&amp;amp;px=999" role="button" title="Capture1.PNG" alt="Capture1.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I am sending also macro file,&amp;nbsp;move &amp;nbsp;this file to same location on your pc.&lt;/P&gt;
&lt;P&gt;C:\Users\user\appdata\roaming\autodesk\c3d 2017\enu\support\actions&lt;/P&gt;
&lt;P&gt;Rename it to "ActMacro001.actm", or any name just keep extension&lt;/P&gt;
&lt;P&gt;restart AutoCAD and go to MANAGE and you will it&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;GOOD LUCK&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN style="margin: 0px; line-height: 115%; font-family: 'FrutigerNextW04-Regular','serif'; font-size: 10.5pt;"&gt;Please select the &lt;FONT color="#339966"&gt;&lt;STRONG&gt;&lt;SPAN&gt;Accept as Solution&lt;/SPAN&gt;&lt;/STRONG&gt; &lt;/FONT&gt;button if my post solves your issue or answers your question&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&lt;FONT face="Calibri" size="3"&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Sat, 15 Apr 2017 03:24:52 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/autocad-forum/help-making-a-button-macro/m-p/7018455#M231169</guid>
      <dc:creator>ara_neresesian</dc:creator>
      <dc:date>2017-04-15T03:24:52Z</dc:date>
    </item>
    <item>
      <title>Re: Help: Making a Button/Macro</title>
      <link>https://forums.autodesk.com/t5/autocad-forum/help-making-a-button-macro/m-p/7018458#M231170</link>
      <description>&lt;P&gt;Thanks alot guys, this gives me something to work with and gives me ideas for other things I might want to do.&lt;/P&gt;&lt;P&gt;Didnt know about the macro record either.&lt;/P&gt;</description>
      <pubDate>Sat, 15 Apr 2017 03:40:54 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/autocad-forum/help-making-a-button-macro/m-p/7018458#M231170</guid>
      <dc:creator>johntrotto</dc:creator>
      <dc:date>2017-04-15T03:40:54Z</dc:date>
    </item>
  </channel>
</rss>

