Hide Table of Contents

Using a Serial Number as a Default Value

This example shows how to use a serial number to create a default value for a part number variable.

See Assigning Default Values.

To use a serial number as a default value:

  1. In the Administration tool, right-click Serial Numbers and select New Serial Number.
  2. In the Serial Number Editor:
    1. For Name, type PartNumber.
    2. For Type, select Serial number from string.
    3. For Format string, type any static text, such as PN, and select a counter value.
    4. Click OK.
  3. Double-click Cards.
  4. In the Card Editor, select Edit > Variables.
  5. In the Edit Variables dialog box, under Selected variable, type the variable name Part Number.
  6. Under Selected Attributes:
    1. For Block name, select CustomProperty.
    2. For Attribute name, type Part Number.
    3. For file extensions, select the file types to use the part number variable.
  7. Click OK.
  8. Open the data card that is associated with the file types.
  9. Add a control that uses a variable.
  10. In the control's property pane:
    1. Under Value, for Variable name select Part Number.
    2. Under Default value, select Serial Number.
    3. To ensure that a serial number is always generated, select Default overwrites.
  11. Click Save or select File > Save.
When a user adds a new file of the type associated with the data card, the Part Number variable is updated with the next available serial number.

The file's mapped property is also updated with the default value.

If you do not select Default overwrites and the variable is mapped to a file property with an existing value, the existing value is used. To generate a serial number for such files, right-click the control in the data card and select Generate next serial number. The variable and file property are updated.


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 a Serial Number as a Default Value
*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 2012 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.