Hide Table of Contents

Using Serial Numbers to Automatically Name Files

You can create new files and automatically name them using serial numbers.

This example describes the use of a serial number to name new part files.

To use a serial number to automatically name a file:

  1. Create the following serial number:
    Name Type Partnumber.
    Type Select Serial number from string.
    Format string
    • Static text: Type P-.
    • Dynamic text : Select Counter Value > 00001.
    Next counter value Type 1000.
  2. Create a Templates folder in the vault.
  3. Add an empty .sldprt file to the folder and check it in.

    You will use this file as the template source file.

  4. Right-click Templates and click New Template.
    See Creating Templates.
  5. On the template wizard Template Name page, name the template Create new part.
  6. On the template wizard Files and Folders page, click Template Variables.
  7. In the Organize Template Variables dialog box, create the following template variable:
    Name Type partnumber.
    Type Select Serial number.
    Serial number Select Partnumber (created in step 1).
  8. Click New File .
  9. In the Select Template dialog box, navigate to the location of the .sldprt file, select it, and click Open.
  10. In the New File dialog box, select the file name (without the extension), click , and select the template variable partnumber that you created in step 7.

    The template variable, which uses the serial number created in step 1, replaces the file name. The new file name reads %partnumber%.sldprt.

  11. Complete the template wizard. On the template wizard Users and Groups page, assign the template to the user you are currently logged in as.
  12. To test the new part template, browse into the vault, right-click, and select New > Create new part .

    A new part file is created, using the serial number as the file name.



Provide feedback on this topic

SOLIDWORKS welcomes your feedback concerning the presentation, accuracy, and thoroughness of the documentation. Use the form below to send your comments and suggestions about this topic directly to our documentation team. The documentation team cannot answer technical support questions. Click here for information about technical support.

* Required

 
*Email:  
Subject:   Feedback on Help Topics
Page:   Using Serial Numbers to Automatically Name Files
*Comment:  
*   I acknowledge I have read and I hereby accept the privacy policy under which my Personal Data will be used by Dassault Systèmes

Print Topic

Select the scope of content to print:



x

We have detected you are using a browser version older than Internet Explorer 7. For optimized display, we suggest upgrading your browser to Internet Explorer 7 or newer.

 Never show this message again
x

Web Help Content Version: SOLIDWORKS PDM 2016 SP05

To disable Web help from within SOLIDWORKS and use local help instead, click Help > Use SOLIDWORKS Web Help.

To report problems encountered with the Web help interface and search, contact your local support representative. To provide feedback on individual help topics, use the “Feedback on this topic” link on the individual topic page.