How to create a Routing library from scratch

It is hard to find any good information on setting up a Routing library on the web.

Best practices are practically non-existent.

So we decided to collect all the useful information here.

In this post, you’ll find

  1. What is SOLIDWORKS routing?
  2. How to get the Routing add-in
  3. Terminology
  4. What is the Routing Library?
  5. How to create your own Routing library
  6. What is the Routing Database?
  7. How to create a new pipe file
  8. Useful resources

This post will be a constant work-in-progress, so please let us know if you have something to add, if it lacks crucial info or if it contains a mistake.

1. What is SOLIDWORKS Routing?

Routing is a SOLIDWORKS add-in that lets you create piping, flexible tubing, cabling and wire harnesses.

You use library parts to create routing assemblies, which are often stored as virtual assemblies within your main assembly.

Routing heavily relies on 3D sketches and virtual components.

To learn how to create parts and assemblies that are compatible with routing, check out How to create Routing components. That section got so large that we decided to give it its own post.

2. How to get the Routing add-in

The only way to get the routing add-in is to get a SOLIDWORKS Premium license.

Source: the official feature comparison for SOLIDWORKS Standard, Professional en Premium.

You also need to select Routing when you install SOLIDWORKS, although it is enabled by default.

Now you only need to turn on the Routing add-in:

enable solidworks routing add-in

3. Terminology

I had trouble understanding the jargon when working with Routing, so I thought I’d explain a few terms first.

Term Area Explanation
DN European standard DN, followed by a dimensionless number.
Higher number = greater pipe diameter.
Number roughly resembles diameter in mm.
Part of the European standard for pipes.
Has similar use as the NPS for the North American standard.
Nominal Pipe Size / NPS North American standard North American set of standard pipe sizes.
Combined with a Schedule for pressure rating/wall thickness.
2-inch pipe always has 60.3mm outer diameter.
Europe uses DN number, where 2 inch = DN 50.
Piping SW Routing Rigid standard tubing from steel or plastic. Uses mostly straight lines and elbows.
PN European standard PN, followed by a dimensionless number.
Higher number = greater wall thickness.
Part of the European standard for pipes.
Has similar use as the Schedule for the North American standard.
Routing Library SW Routing The folder that contains all routing part files.
Routing Database SW Routing A long list of all configurations that are found in all routing parts.
Schedule North American standard Non-dimensional number for the wall thickness of a pipe. A higher number equals thicker walls.
Europe uses a PN number.
Specification SW Routing The property SOLIDWORKS uses to match a pipe to a flange or fitting. Very important.
For pipes, this is a custom property.
For other components, this is a setting for each Connection Point / CPoint.
Spool SW Routing An assembly that can be manufactured as one item. You can define multiple spools in one route assembly. They can be used to create drawings and BOMs. More info here.
Tubing SW Routing Flexible tubing. Uses mostly splines to create routes.

More terminology is explained in the official Glossary.

4. What is the Routing Library?

The Routing Libary is a fancy name for the folder with all your routing models.

The default location is C:\ProgramData\SOLIDWORKS\SOLIDWORKS 2020\design library\routing\

But the best practices are:

  1. Use a drive on your company network
  2. Add the files to PDM
  3. Do not use the Toolbox folder. SOLIDWORKS states this explicitly.

You can change the path in the Routing Library Manager.

routing library folder path network

5. How to create your own Routing library

  1. Create a backup first. Open Routing Library Manager, the Routing file locations and Settings tab. Click Save Settings.
  2. Select the path for your Routing library and template. If you want to use files on a network drive, now is the time to select that folder.
  3. Select your units. By default, it is set to Inch.
  4. Create a pipe file. See section 7 and our other article.
  5. Create flanges and tees. See our other article.
  6. Add the files to your database. You should at least add the pipe and elbow, everything else is optional. See the next section for details.

These steps sound simple, but people have spent weeks, months to get their library set up correctly. So be warned.

6. What is the Routing Database?

The Routing Database or Piping and Tubing Database is a flat list of all configurations of all routing components in your library.

  • It is stored in a single file called routinglib.db in the root of your routing library.
  • We could not find a setting to change the file name or location. You can only move the whole library.
  • The file is an SQLite database file, so you could edit it if you know what you’re doing. You cannot edit the file in a text editor.
  • When you add a file to your library, you need to refresh the database to index the configurations in this file.

You usually don’t need to worry about making this database perfect, it’s hardly ever used. You do need to add your default pipe and elbow to the database though, otherwise you cannot select them in the Route Properties tab.

routing database columns metric pipe

6.1. How the Routing Database extracts data from models

The indexing process uses poorly-documented methods to extract data from routing parts and assemblies. Here’s what we could find:

  1. Type: custom property ComponentType (file-wide, not configuration-specific)
  2. SubType:
  3. SKEY: custom property IsogenSKey
  4. File Name: file name with extension
  5. Config Name: configuration name
  6. Size: probably read from the NominalDiameter
    • If you get numbers that are a million times too large, check the next section for the fix.
  7. Path: relative path in the Routing library
  8. Schedule: custom property Schedule Number
  9. Class: custom property Specification or Class. Seems to depend on the component type.
  10. Part Number: configuration name
  11. Description: custom property Description or Custom Description?
  12. Material: Custom property Material. Seems not to work.
  13. Manufacturer: Custom property Manufacturer. Seems not to work.

The Type is the only one that uses a single custom property for the whole file because it’s the same for all configurations. All other custom properties are configuration-specific.

Source: this forum topic by Peter De Vlieger.

6.2. How to add files to the database

You need to perform two steps. First, add the file, then add its configurations:

  1. Open the Piping and Tubing Database tab, click Select Components.
  2. Select Scan for library components which are not in the database, then Scan.
  3. Check the checkbox for your new part file and click Save. The part needs to be in the database, so click OK to add it.
  4. Now the part is added to the database, but it’s not yet on the list. That is because the library only contains configurations, not parts.
  5. Click Import Data to refresh all files in the database and read their configurations.
    1. When you do this for the first time, it will take 10 minutes to a few hours.
    2. When you run it a second time, it will only check the files in the window that pops up. So it will be much faster: in my case, less than a minute.
    3. SOLIDWORKS opens and closes all files and the window becomes active every few seconds, so you cannot do other work during this time.
  6. It might look like SOLIDWORKS adds gibberish data to the Size column, but:
    1. You don’t really need to this be correct anyway….
    2. SOLIDWORKS cannot handle my European number system and it interprets a comma as the thousands separator.
    3. To fix this, always set your system to use English (United States) before you refresh your database. Open Windows Settings > Time and Language > Region (in left column) > Regional format > English (United States)
    4. I found that I needed to remove files from the database first, a simple refresh with Import Data didn’t update the values.

7. How to create a new pipe file

  1. Create a part file:
    1. We describe the rules for a pipe in How to create Routing components.
    2. If you decide to copy and edit the existing file, don’t forget to set the units in the Document Properties.
  2. Add the part to the database. See section 6.2 for how to do this.
  3. Select the new pipe as the standard part:
    1. Go to the tab Route Properties
    2. Click the browse button right of the pipe file path. This will take you to the database tab with an active filter for Pipes.
    3. Select one of the configurations in the new pipe file.
    4. Click Accept Component on the left, or Cancel at the bottom.
    5. This step took me half an hour because it would not select the right file. I reported a bug in the type filter because it would show Nipples as well as Pipes. I selected a pipe, then the new setting showed a nipple. It’s Nipplegate all over again…
    6. I finally got it to work by applying a file name filter so only my new file was visible, then select one of the configurations from that.
  4. Don’t bother about any of the other settings 🙂

Useful resources

Conclusion

We find the Routing add-in very confusing. The terminology was new for us, and what is the library? What is the database? While learning all of that, we wrote it down to share it with you.

Also check out our other post: How to create Routing components

We hope it was helpful for you as well. Please let us know if you have something to add.

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

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