An Introduction to Macros in SolidWorks Electrical

By Hawk Ridge Systems Engineering Team 

Typically, in our day-to-day design process, we reuse our work. Let’s say that I design a motor schematic, and I wire it the same way. With “macros”, in SolidWorks Electrical, we can take those designs and reuse them in any project. Don’t be thrown off by the term “macro”, as you won’t need to do any programming or record any steps. All it requires is a drag and drop. This is illustrated in the example below.

Creating a Macro

The creation of a macro is simple: Select a portion of the schematic that you want to reuse, and then drag and drop into the “Macros” Tab of the left pane.

Create a Macro in SolidWorks Electrical

Give the macro a name, description, and any other properties that would be useful in describing the circuit(s). This does more than save just the graphical information. In this example, it also includes the referenced symbols such as the breaker, contactor, terminal strips, and motor. Manufacturer parts, wire styles, cables, and connections that are associated with the symbols are also included. Now that our macro is now added to our left pane, we are able to save it for future use.

We can also change how the preview image is displayed. With a right-click in the left pane, we can create new groups in which to organize the macros, rename the group, delete groups, or change the size of the macro thumbnail. In this example, I made the thumbnail preview larger so it would be easier to determine which macro is to be used.

SolidWorks Electrical Macro - Thumb 1SolidWorks Electrical Macro - Thumb 2SolidWorks Electrical Macro - Thumb 3

Using a Macro

In order to apply the macro, it is also as simple as a drag and drop. Left click and drag the macro onto your schematic to add it. Be sure to line up or trim any wire connections.

SolidWorks Electrical Macro

Notice that the macro drops all of the symbols, wires, etc… and places them in your design. This will add the appropriate components to your tree with new tags. Note how the new motor took an unused tag. In this case, it was “M5”. Also, the breaker “Q11” and contactor “K11” took unused tags while keeping the same manufacturer part. If we look at the “X4” terminal, it keeps the symbol on the same terminal strip, but adds new terminals for each of the connections.

We could have done the same thing using a copy and paste of schematic items. The advantage of using “macros”, however, is that we can reuse these items in any project. We do not need to search the pages of our design to find that one circuit. It is very easy to copy, make edits, and create different configurations of “macros” in a library, and use them readily.

Was this article helpful?
0 out of 0 found this helpful



Please sign in to leave a comment.