Smart export – use custom properties, sheet names, dates

You are here:

In Drew 3.2 and newer, you can store your preferences regarding exporting files. You can use variables to create filenames, so you never have to do that manually ever again.

File types for exporting SOLIDWORKS files

Currently, we support exporting to the following file types:

  • DWG (drawings)
  • DXF (drawings)
  • eDrawings (all model types)
  • JPG (all model types)
  • PDF (all model types)
  • 3D PDF (parts and assemblies)
  • PNG (all model types)
  • STEP 203 (parts and assemblies)
  • STEP 214 (parts and assemblies)
  • STL (parts and assemblies)

We use your SOLIDWORKS export settings. These settings control, for example, how drawings with multiple sheets are exported to DWG and DXF.

How to store your export preferences

In the Drew settings, under the Export tab, you can store your export settings. Click the plus button to add a new setting, then select:

  1. A file type
  2. Whether an export button should be visible for parts, assemblies and drawings.
  3. Whether Drew should ask to overwrite an existing file or overwrite it without asking.
  4. Whether you want to manually confirm the created export path and filename.

Drew export settings - custom properties - sheet name - date time

How to use variables to build a path

Your company probably has a policy on how to create filenames for exports. Our goal is to store those preferences in Drew settings.

So for every file, when you click export, Drew builds the path from your settings. You can use hardcoded directories, the current filename, custom properties, dates and times.

Available variables

  • <directory> The current directory that the file is in
  • <filename> The current name of the file you are trying to export, without the extension
  • <datetime(format)> The current date, time or a combination. See below on how to format the date and time.
  • <customproperty(name)> The value of a custom property in this file. Only uses file-based properties, not configuration properties.
  • <sheetorconfig> The current sheet name (for drawings) or configuration name (for parts and assemblies).

These tags are not case-sensitive and Windows paths are not case-sensitive either. Only the format between datetime brackets is case senstive.

Example paths

  • <directory>\<filename> (this is the default, we’ll add the extension)
  • C:\exports\pdf\<filename>
  • <directory>\STEP\<filename>-rev<customproperty(revision)>
  • <directory>\STEP\<filename>-<datetime(yyyy-MM-dd)>

How we validate your input

Every time you type a letter in the textbox for the path, we validate the input by converting the input to a test path. If a tag is not complete or the result is not a valid path, we show a red border around the textbox. We only save valid changes.

solidworks export path use custom property sheet name

In the image above, the top path is not correct because the last closing bracket is missing. The bottom path is correct.

How to format date and time

We use the standard Windows date-time formatting rules. You can find all the available tags here. The most relevant ones:

  • Date:
    • yy: year 01-99
    • yyyy: year 0000-2100
    • M: month 1-12
    • MM: month 01-12
    • d: day 1-31
    • dd: day 01-31
  • Time:
    • H: hour 1-24
    • HH: hour 01-24
    • m: minute 1-59
    • mm: minute 01-59
    • s: second 0-59
    • ss: second 00-59

This formatting is case-sensitive. A capital M is used for months, a lowercase m is used for minutes.