Use macros to automate work

Autodesk Support

Nov 19, 2024


Products and versions covered


Issue:

You want to know how macros can be useful and would like an example of how they can be used.

Solution:

Macros can help to automate your work and speed the drawing process. Your macros do not have to be long and complex to be useful. You can create some really useful short macros that are not complex. For example, you can start a command and then run a short macro to complete it. This type of short macro can save time.

This solution provides an example of a short macro that you use to complete the INSERT command.

In this example, you need to insert several different blocks, using the same insertion point, scale, and rotation angle. In this situation, you start the INSERT command, and select the block to insert. After that, the remaining input required to complete the command is the same. That is, you use the same insertion point, scale, and rotation angle. To speed up this process, you can create a short macro to complete the INSERT command.

To create and use the macro:

  1. Create a new toolbar button.
  2. In the Button Properties dialog box, assign the following macro to the new button: 0 1 1 0 _zoom _e
  3. Start the INSERT command. You can use INSERT or -INSERT. To use the macro with the dialog box version of the command (INSERT), in the Insert dialog box, select the Specify On-screen option for Insertion point, Scale, and Rotation.
  4. After you select the block to insert, you are prompted for the insertion point. Click the toolbar button created in steps 1 and 2. The macro runs and completes the INSERT command.

Following is a break-down of the the macro:

0,0Insertion point
1X scale factor
1Y scale factor
0Rotation angle
_zoomZOOM command
_eExtents command option of ZOOM command

Products:

All Desktop Products;


Was this information helpful?


Need help? Ask the Autodesk Assistant!

The Assistant can help you find answers or contact an agent.


What level of support do you have?

Different subscription plans provide distinct categories of support. Find out the level of support for your plan.

View levels of support