How to fix problems with document templates

I had a hard time fixing my SOLIDWORKS document templates.

So I thought I’d share what I learned.

In this post, you’ll find

  1. What are document templates?
  2. Where are SOLIDWORKS templates stored?
  3. How to change the template directory
  4. Can I download fresh templates?
  5. How to create new SOLIDWORKS templates
  6. Can I detect which template was used to create a file?
  7. How to stop SOLIDWORKS from creating new templates
  8. I added a directory with templates, but they don’t show up
  9. Why does SOLIDWORKS show templates from different folders in the same tab?
  10. Why does SOLIDWORKS show an empty template tab?
  11. How to disable/enable choosing a template for each new file

1. What are document templates?

This post is about three types of SOLIDWORKS templates:

  1. Part templates: *.prtdot files
  2. Assembly templates: *.asmdot files
  3. Drawing templates: *.drwdot files

2. Where are SOLIDWORKS templates stored?

The default folder is C:\ProgramData\SOLIDWORKS\SOLIDWORKS 20xx\templates

When you install a newer version, SOLIDWORKS reuses templates from this version. I have SW 2021, 2022 and 2023 installed and they all use the 2021 templates.

This is not ideal, because the official advice is to create new templates every time you switch to a new SOLIDWORKS version.

I just checked to see if templates for each version actually exist at all. But no, the template folders for other SW versions are still empty.

3. How to change the template directory

Go to System Options > File Locations. Document Templates is at the top of the list.

change template directory folder

4. Can I download fresh templates?

You don’t need to. You can quickly create them yourself.

Check out Create clean SOLIDWORKS templates: one simple trick to learn more.

5. How to create new SOLIDWORKS templates

You cannot create your own template file completely from scratch, probably because a SOLIDWORKS file consists of multiple file types zipped together.

So these are the steps to create a new template:

  1. Let SOLIDWORKS create a fresh template. See Create clean SOLIDWORKS templates: one simple trick. Let’s say you are creating a part template.
  2. Create a new part using this template.
  3. Change some of the document settings.
  4. Click File > Save As
  5. Select Part Template. Be aware that it now switches the selected folder to your templates folder.
  6. Enter a filename and hit Save.

Save as solidworks part template

6. Can I detect which template was used to create a file?

No, you cannot.

There are some confusing methods in the SOLIDWORKS API though: EditTemplate, ReloadTemplate and GetTemplateName. But these methods are used for Sheet Formats, which SOLIDWORKS apparently called templates decades ago.

7. How to stop SOLIDWORKS from creating new document templates

SOLIDWORKS creates a new part/assembly/drawing template when it can’t find one. I showed you how in the blog post mentioned in sections 5 and 6.

That means that if SOLIDWORKS keeps on creating new templates, you have not set up your template directory correctly.

Make sure your template directory (or its subfolders) contains every document template.

For more details, check out Stop SolidWorks from creating default templates on the SOLIDWORKS forum.

8. I added a directory with templates, but they do not show up

I still don’t understand why this happens. Maybe because both directories have the same name (see the next section).

I just know I was able to fix it. All I did was click “Move Up” on the new directory in the settings.

Before:

default templates

After:

Document templates change order in settings

9. Why does SOLIDWORKS show templates from different folders in the same tab?

Because SOLIDWORKS uses the directory name to create tabs. I found that here in the help.

If you two directories are named “Templates” or “templates” (SOLIDWORKS is not case sensitive), then the contents of these directories are merged in a single tab.

Before:

Document templates change order in settings

After I renamed one of the directories and added the new directory to the settings:

10. Why does SOLIDWORKS show an empty template tab?

This happens when you have a main folder that contains no templates, just subfolders with templates.

SOLIDWORKS will add a tab for each subfolder and a tab for the main folder, which then contains not a single template.

This doesn’t seem to happen in newer SOLIDWORKS versions though. It doesn’t even happen in my SW 2017 installation.

11. How to disable/enable choosing a template for each new file

Some people like to choose their template for every new file, but some people hate it.

You can change this in the settings > Default Templates > Always use these default document templates or Prompt user to select document template:

Always use default templates - prompt user select template

Don't miss the next post. Get a free add-in.

Subscribe to our newsletter and get our TimeSavers add-in for free.