Do you like to use macro in AutoCAD? Either by creating your own or using action recorder? If you do, you may want to place it to tool palette, so you can easily access it.
If you use action recorder, to run it, you simply use the macro name to run it.
In the sample above, I named it as symb01. To run it, I can choose it in ribbon then press play. Or type symb01 then [enter].
To place the macro in tool palette, we need to add an AutoCAD command first, then modify the properties. It can be any simple AutoCAD command.
In this sample, I draw a line. Then drag it to my tool palette. If you need more information, you can read how you can create your own palette here.
Now right click above the new button, then choose properties.
In properties dialog box, change the name and description as necessary.
Then in command string, change it to your macro name. Or if you want to write a macro here, you can do it too.
You may also want to change the image. Right click above the image and choose specify image. There are more options that allow you to change the objects layer and properties. You may want to explore it by yourself later. This time, let’s just click OK.
Now you should see the tool’s updated. Try to click it to see if it works.
Not only in tool palettes, you can also create a new command to run the action recorder’s macro. That will give you more control. It will allow you to place it in AutoCAD ribbon panel or toolbar.
If you are command line lovers, don’t forget that you can use it in command alias (acad.pgp).
Personally I don’t use AutoCAD action recorder much. But I’m curious if you do use it regularly. What are you using it for? Will you share some sample for us to try?
Hi, I have use it to import Pagesetups then take me to the Plot dialog box for Preview. I also use it to create Textstyles.
I tried using it for a couple of things but found the inability to use an AutoLISP variable within the macro a limitation I couldn’t get around. I ended up writing a short AutoLISP program to accomplish what I wanted. I still keep it in mind when I have to accomplish repetitive tasks.
Yeah, action recorder was meant for users who don’t know how to write macro or LISP. If you know LISP or .NET, that is the best way to go.
Thanks for asking if anyone had a need for macros. I saw some tutorials on You Tube that were driven by macros that would be extremely helpful for drawing pumps, motors, tanks and stairs. The tutorials may have been third party software, but if not I would love to know where to find information on this..
Also, I have created several piping dynamic blocks which reside in my Tool Palette. The dimensions for these dynamic blocks are in a block table within the dynamic block which means I have to place them all using the default size and then change them to the size I need.
I know very little about macros, but have played with them enough to know that I could easily create one macro (for each pipe size) that would allow me to insert them at the correct size. This would save a lot of time, but unfortunately it looks like macros do not recognize changing the properties of a dynamic block in the Tool Palette as an action. Nothing appears in the action tree when I make the changes.
Can you tell me if there is a way around this? It might work if I could do this by key-in commands, but I haven’t found anyone that can tell me if key in commands to do this even exist.
Thanks,
Keith
.
Keith,
I don’t think you can use macro to change Dynamic Block properties during insertion. Dynamic Block requires user interaction to change the properties.
You can, however, change the size in palette properties if you use Block Properties table. Create several tools in a palette and change each properties there.
Hey ,
Hope you are fine , dear sir ,
I want to asked some question about LISP , Kindly contact me ,
I am waiting here
Regards
Muhammad Bilal
I played with it after seeing it @ AU09. It is a little limited in some applications, but is cool if ur learning how too write macro's.
Interesting. I never see anyone use it on regular basis. What are you using it for?