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 (12)
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.
Arek says:
Somehow it doesn’t work for me, even though explanation is good. What it does is, it copies the entire text for example $PRP:”SW-Short Date” and that is what I have in the table, not a date. Maybe I am doing something wrong?
All I was looking for is to pulling some information into my title block in the drawing from a part that I made. Normally I make properties for every single part I make on my own, just by opening properties. I just wanted these properties to be put in the title block when I make my drawing, but nothing like that happens, I have to type them on my own, so when I make 50 drawings a day I have to repeat filling the title block 50 times.
Any help?
Paul says:
Nice tutorial.
I recent made new custom drawing templates. With refer to my custom .prtdot part template. When I open a new part with the custom part template and make a drawing of it, everything is OK.
However I have older solidworks part files and when I open them they still use the default prtdot file and the part properties are the default ones, so when making a drawing the properties are not embedded in the drawing file.
A work around is to open new part in a custom part template and insert an excisting part in it and save it under a different name of the excisting part. This way is not preferable when i.e. excisting assemblies are used.
Is there a smart way to let Solidworks prompt for the custom prtdot in stead of the default prtdot when opening an old file.
Kind regards
Crispijn says:
Yeah, I’ve got a new solution for that. This is a very old post with dated information. I’m confident that you has to store the information in the part or assembly, not in the drawing. You can get the information out of the part or assembly on your drawing. In this case you can easily change the drawing template/format.
I’ll make the new tutorial in a couple of weeks because I don’t have much time for that now!
Geller says:
thank you very much this is such a good thing for us beginners very detailed tutorials keep it up.