• Skip to main content
  • Skip to search
  • Skip to footer
Cadence Home
  • This search text may be transcribed, used, stored, or accessed by our third-party service providers per our Cookie Policy and Privacy Policy.

  1. Community Forums
  2. Allegro X PCB Editor
  3. Automate Design Tasks: Script Versus Macros!!!

Stats

  • Replies 0
  • Subscribers 158
  • Views 2254
  • Members are here 0
More Content

Automate Design Tasks: Script Versus Macros!!!

mahimag
mahimag 9 months ago

Do you struggle with your scripts not prompting you to pick a start point? If your answer is yes, macros are the solution for you.

You can use both scripts and macros to automate design tasks.

Scripts always start and end at the same coordinate, whereas a macro lets you start at a different coordinate each time you use it. Every action included in the macro takes place relative to the starting point.

A macro is a script that lets you automate a series of point selections and replay them, starting at another coordinate. When you replay a macro, the layout editor prompts you for a starting point (origin). The macro places the point selections you recorded relative to this starting point. This is useful in operations you must repeat on a board/design drawing, for example, repeating complex geometric operations.

For example, the following image shows two lines: one created while recording the macro and the other during replay.

To record a macro, select the Macro record mode check box, as shown below, and record just like a script.

The format of a macro file is shown below.

Notice the pick_origin and pick rel commands that ask for user input, and then run the other commands in the script.

Try recording macros when you want a sequence of commands to replay and ask you for the start point.

  • Sign in to reply
  • Cancel
Cadence Guidelines

Community Guidelines

The Cadence Design Communities support Cadence users and technologists interacting to exchange ideas, news, technical information, and best practices to solve problems and get the most from Cadence technology. The community is open to everyone, and to provide the most value, we require participants to follow our Community Guidelines that facilitate a quality exchange of ideas and information. By accessing, contributing, using or downloading any materials from the site, you agree to be bound by the full Community Guidelines.

© 2025 Cadence Design Systems, Inc. All Rights Reserved.

  • Terms of Use
  • Privacy
  • Cookie Policy
  • US Trademarks
  • Do Not Sell or Share My Personal Information