How to fix problems with document templates

I ran into some strange behavior when trying to add 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 document templates stored?
  3. How to change the template directory
  4. Can I download fresh templates?
  5. Can I detect which template was used to create a file?
  6. How to stop SOLIDWORKS from creating new templates
  7. I added a directory with templates, but they don’t show up
  8. Why are templates from different folders shown in the same tab?
  9. Why does SOLIDWORKS show an empty template tab?
  10. 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 document 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 2017, 2019 and 2020 installed and they all use the 2017 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.

I wrote a short post about this trick. Read it here.

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

No, you cannot.

There are some confusing methods in the SOLIDWORKS API though, called EditTemplate(), ReloadTemplate() and GetTemplateName().

These methods all concern Sheet Formats, which SOLIDWORKS apparently called templates decades ago.

6. 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 in the section above this one.

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 this forum topic.

7. 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

8. Why are templates from different folders shown 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:

9. 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.

10. 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 the settings here:

Always use default templates - prompt user select template

Do you have anything to add?

Did you not find your answer? Is there something you want to add?

Send an email to [email protected] and I will always reply.

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

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