Customize SOLIDWORKS Electrical Using Formulas

Formulas are used throughout SOLIDWORKS Electrical to customize wire labels, component marks, automated reports and more. They allow you to use SQL variables to extract information stored in the database and automatically present that information in the form of text within your documentation.

Formulas are customized using the formula manager which is accessible through the user interface wherever applicable. The image below is from the project settings and shows the formulas for customizing and generating the various marks within a project. The formulas are displayed for each mark and can be customized by accessing the formula manager using the icon shown at the right.

Customize SOLIDWORKS Electrical Using Formulas

The formula manager has tabs for Predefined and Recently used formulas. Additionally, there is a Variables and Simple Formulas tab that can be used to build a custom formula. The image below shows the Variables and Simple Formulas tab for Component Marks. 

Customize SOLIDWORKS Electrical Using Formulas

Note that the formula for Component Marks uses two SQL variables and is defined as COM_ROOT + COM_NO. COM_ROOT is a letter (or letters) designated in custom settings and associated to the class or type of element to which the mark is being applied. COM_NO is a number that is incremented for each new mark of a given class of element. A practical example of component marking would be the marks created for control relays.

Customize SOLIDWORKS Electrical Using Formulas

Control relay marks start with CR1 and COM_NO increments for each subsequent control relay mark (CR2, CR3, …).

Let’s use a more detailed example to describe the customization that is possible using formulas. What if we wanted our wire numbers to include the document number where the wire originates?

This information can be handled via the formula manager so that it is presented according to your needs. Additional information can be added to a formula by adding additional available SQL variables to the formula. In our case we’ll add the SQL variable that is associated to the document number.

Wire numbering can be accomplished using an EQUIPOTENTIAL numbering system or individual WIRE numbering system. For this example we’ll use equipotential numbering which can be set in the wire style manager.

Customize SOLIDWORKS Electrical Using Formulas

To define the formula for equipotential numbering, we’ll need to access the formula through the properties of the wire style used.

Customize SOLIDWORKS Electrical Using Formulas

Next, we can modify the equipotential numbering formula using the formula manager. The current formula for the equipotential numbering of a 24V control wire is ‘-‘+EQU_NO+’-‘ which is simply the equipotential number prefixed and suffixed with a dash.

Customize SOLIDWORKS Electrical Using Formulas

Customize SOLIDWORKS Electrical Using Formulas

Our goal is to have the equipotential number plus the document number where the wire originates in the wire number. To change the formula we can use the Variables and Simple Formulas tab in the wire manager. We can add the variable FIL_TAG (document number) to the equipotential formula.

Customize SOLIDWORKS Electrical Using Formulas

The new formula will display the equipotential number (EQU_NO) with a dash then the document number (FIL_TAG). Once the new formula is defined, we can renumber the wires.

Customize SOLIDWORKS Electrical Using Formulas

SOLIDWORKS Electrical has many tools for customization and formulas are a major part of that toolset. By mastering formulas, you’ll be well on your way to mastering the customization of your electrical documentation.

 

CAPINC
CAPINC was founded on one core principle: Provide the best solutions and services to assist our customers in designing and developing better products. CAPINC provides premier solutions and services in New England to assist our customers in accelerating their design and development process for better mechanical products. Our award winning technical support team is comprised of industry experts with hundreds of years of combined practical experience in mechanical design, design validation and analysis, product data management, and technical communication. We are the award winning 3D solutions partner offering SolidWorks software and training, and the entire Stratasys line of 3D printers and production systems. For more tech tips and blog tutorials check out CAPINC's blog and videos.
CAPINC