Creating Custom Symbols for Drawing Annotations in SOLIDWORKS
When working in SOLIDWORKS and creating your own symbols for use in Annotations such as Notes, Dimensions and Tables in Drawings, it is important to understand what is controlling these symbols and how to modify those symbols for your own use.
Let’s start by taking a look at some common symbols:
When adding these symbols in a Dimension, we can see the syntax typed out in the Dimension Text Box.
So where is this syntax defined and how do we modify them?
To find that information, let’s take a look at the entire library of symbols by selecting the Add Symbol button when editing a Note, Dimension or Table and then selecting More Symbol…
We have access to all the default symbols organized into Categories.
What we also see is at the bottom of this window is the File Location for our Symbol file which is the gtol.sym file. The default location for this is:
If you navigate to this file using Windows Explorer, you can open it using any text editor such as Notepad.
Tech Tip: When editing the gtol.sym file, it is always recommended to create a backup copy just in case.
So, let’s open this file and break down what it means.
Each row of text in the gtol.sym starts with an identifier.
Semi-Colon “;” is used as a comment row which means it is used as a note to the reader only and does not actually affect any symbols. Any rows with only two semi-colons “;;” are typically used as dividers.
Pound “#” indicates a new Category. #<Name of library>,<Description of library>. Any lines following a pound row are part of that Category.
Asterisk “*” indicates a new symbol. *<Name of symbol>,<Description of symbol>. The Name of symbol is used in the syntax, while the Description is used as a tooltip with more information for that symbol.
Letter “A” identifies a row with a geometrical shape used to create the symbol. Shapes can be Lines, Circles, Arcs, Text and Polylines.
You will find that each symbol has one or more “A” lines to make up each individual piece of geometry to draw out the symbol while each X and Y coordinate lie on a 1 by 1 imaginary grid space as shown where the bottom left corner is 0,0 and the top right corner is 1,1:
Each geometrical shape has it’s own syntax, for example, A,CIRCLE xCenter,yCenter,radius where xCenter is .5, yCenter is .5 and radius is .5 will be written as:
And will be drawn as:
Tech Tip: Symbols are not only limited to this grid space. You can have numbers larger than 1 and less than 0 (negative).
Let’s take a symbol we should all be familiar with, the Diameter symbol:
And it’s corresponding code in the gtol.sym file:
The syntax comes from the Name of the Library #MOD combined with the Name of the Symbol *DIAM or <MOD-DIAM> and is composed of 2 geometrical shapes, a circle centered on .5,.5 with a .35 radius, and a line that starts at .3,0 and extends to .7,1.
We can also see the Description of Library is listed as the Category and the Description of the Symbol is listed as the symbol name when you hover over it.
One way we can use all of this information to our advantage is to change an existing symbol to fit our needs such as creating a Numbered Five Sided Flag Symbol.
In the following example, I’ve copied over the existing <Key-Key> symbol to create a new custom Category of Five Sided Flag Symbols with a number filled in instead of the “Key” text while keeping the other geometric shapes from the Key Symbol the same.
The new Five Sided Flag Symbol Category is defined as follows:
Tech Tip: Once you edit your gtol.sym file, you must exit and restart SOLIDWORKS for the change to take effect.
You will now see additional Five Sided Flag Symbols in your Library with the syntax <FiveSided-1>,<FiveSided-2>, and <FiveSided-3>.
Tech Tip: You can have as many numbers as entries in the gtol.sym file, so if you need additional numbered flags, you can add them as needed.
You can also check out a great tutorial in the SOLIDWORKS help file to add a Third Angle Projection Symbol.
Computer Aided Technology