Custum SolidWorks templates are very handy. You always have one layout for your drawing which matches the style of your company. But how do you create your own custom templates? What is possible? What do you need?
First of all, you need a nice basic template. For this tutorial I’ve used the standard/default templates that are used by a fresh SolidWorks installation.
You’ll have to change three templates.
- Part – *.prtdot
- Assembly – *.asmdot
- Drawing – *.drwdot
You can find the SolidWorks template files in:
C:\Documents and Settings\All Users\Application Data\SolidWorks\SolidWorks 2008\templates
Copy the default templates (just for a backup) to a new folder and let’s get started with your own templates!
Part template
When you open the part.prtdot file in SolidWorks you see an empty file.

Go to file -> Properties

And a popup window appears. Choose the custom tab.

You can pick one of the variables in the ‘Value / Test Expression’ column, put static text into the boxes or pick one of the variables in the list below to add automatically the info to your title block in the lower right corner.
- $PRP:”SW-Author”
I’ve fount this one on the internet but it doesn’t work – yet!?
I’ve used a manual Author - $PRP:”SW-Comments”
- $PRP:”SW-Created Date”
- $PRP:”SW-File Name”
- $PRP:”SW-Folder Name”
- $PRP:”SW-Keywords”
- $PRP:”SW-Last Saved By”
- $PRP:”SW-Last Saved Date”
- $PRP:”SW-Short Date”
- $PRP:”SW-Subject”
- $PRP:”SW-Title”
After I’m finished I’ve got this result:

Note!
You can change the order of the properties by clicking on the number and drag it to the preferred position.
Change all the preferences to the part. For example: show the origin and the standard planes.
Click on the ‘OK’ button and close the part after you’ve saved it.
Assembly template
Do the same for the Assembly template. Open the file ‘assem.asmdot’ and change all the properties to your preferences. My result:

Set all your preferences and click on the ‘OK’ button. Close the assembly after you’ve saved it.
Now we only have to create a drawing template!
Designing a title block
First you’ve got to think about the layout of your drawing layout and title block. Make several sketches on paper. Notice all the default variables you’ve added to the properties in the part and assembly templates. All of this information has to be in the title block, but there is more important information that you has to show.
- Projection type
- Sheet scale
- Standards
- Tolerances
- Material
- Quantity
- Etcetera…
I’ve translated my final sketch to a design in Adobe Illustrator. You can also start drawing in the Drawing template.

Export the layout to a *.dwg file. For example:

Open the file with the SolidWorks DWGeditor or AutoCAD. Let’s see what the end result is. Images are not exported to the dwg file.

Ajust the titleblock to your own preferences.
Move the block to the origin of the file. Type ‘move’ in the command line and select the entities. Hit enter and click on the bottom left corner of the rectangle. Type ’0,0′ to specifie the base point and the block is moved to the origin of the drawing.

Save the file and exit the program.
Drawing template
Open the drawing template from your templates folder and the default templates is shown. Rightclick on ‘Sheet1′ in the feature tree and select ‘Edit sheet format’

Delete the existing title block.

Insert a a block.

Adjust the scale

Add some images to add more style to the titleblock and than we go adding the variables to the titleblock.

Add notes to all the fields where you’d prefer the information. Insert a variable to the note. Use the following Syntax:
$PRPSHEET:”propertiename“
Note that you enter the property name between “” and not the {}. This syntax will be recognized as a variable and will be converted to a syntax with accolades.
Good

Wrong

You can also add some variables which refers to the sheet.
- $PRP:”SW-Current Sheet”
- $PRP:”SW-Sheet Format Size”
- $PRP:”SW-Sheet Name”
- $PRP:”SW-Sheet Scale”
- $PRP:”SW-Template Size”
- $PRP:”SW-Total Sheets”
This is my result:

Go back to ‘Edit Sheet’

You’ll notice that none of the variables are displayed in the title block. Great!

Go to Sheet1 and properties to change the sheet format and choose another paper format. Style all the paper formats you use in your company. I’ll choose A4, A3 and A0.


Save all the templates under a different file name. This is easier to use.
Now save the drawing template and let’s start making a drawing!

Don’t you love the result? Read more about making a drawing in 1. Solidworks basics





Comments (8)
Dave says:
I’ve searched a lot on the internet but I didn’t find such a detailed tutorial. Thank you very much for your time and effort!
Greetz, Dave
Stephanie says:
How do I draw an titleblock in SolidWorks without drawing it in Adobe Illustrator or AutoCAD?
Crispijn says:
@Stephanie: Good question. I’ll update this post asap!
Agnaldo Trennepohl says:
I want to convert the format of data obtained through the variable SolidWorks SW-Created Date w / the format day / month / year, how to proceed within Visual Basic??
Function in Visual Basic that returns the creation date of the file:
- Data_desenho = “$PRP:” & Chr(34) & “SW-Created Date” & Chr(34)
Crispijn says:
I’ve no experiance with Visual Basic so I’m affraid I can’t help you. Why do you want to obtain the data/variables? Are you building a plugin for SolidWorks?
Agnaldo says:
Yes, I want to create a form to fill the caption / format in Drawing.
If you know how to procure the conversion, please return.
Thank you.
Crispijn says:
Hi Agnaldo!
Do you already have your application running? I’m very curious to your solution!
Thanks in advance!
Agnaldo Trennepohl says:
Yes, I got the way of conversion:
Data_desenho=FormatDateTime(swPart.SummaryInfo(swSumInfoCreateDate),vbShortDate)
I sought information from the summary of SolidWorks.
I hope this helps others.