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.