Hide Table of Contents
AllocSerNoValue Method (IEdmSerNoGen7)

Generates a new serial number for the specified file, data card, or card control using the specified serial number generator.


Visual Basic (Declaration) 
Function AllocSerNoValue( _
   ByVal bsSerNoName As System.String, _
   Optional ByVal lParentWnd As System.Integer, _
   Optional ByVal bsFilePath As System.String, _
   Optional ByVal lFolderID As System.Integer, _
   Optional ByVal lFileID As System.Integer, _
   Optional ByVal lCardID As System.Integer, _
   Optional ByVal lCardControlID As System.Integer _
) As IEdmSerNoValue
IEdmSerNoValue AllocSerNoValue( 
   System.string bsSerNoName,
   System.int lParentWnd,
   System.string bsFilePath,
   System.int lFolderID,
   System.int lFileID,
   System.int lCardID,
   System.int lCardControlID
IEdmSerNoValue^ AllocSerNoValue( 
&   System.String^ bsSerNoName,
&   System.int lParentWnd,
&   System.String^ bsFilePath,
&   System.int lFolderID,
&   System.int lFileID,
&   System.int lCardID,
&   System.int lCardControlID


Name of the serial number generator to use to generate a new serial number (see Remarks)
Parent window handle; passed to a serial number add-in, if it exists
Path to the file for which to generate a serial number
ID of the file's parent folder
ID of the file for which to generate a serial number
ID of the data card in which the serial number is generated
ID of the control for which to generate a serial number

Return Value




The difference between this method and the now obsolete IEdmSerNoGen6::GenerateSerNo method is that this method returns an IEdmSerNoValue interface instead of a string. IEdmSerNoValue::Rollback allows you to return generated numbers that you can not use. This helps to avoid gaps between serial numbers.

bsSerNoName is the name you specify in the SOLIDWORKS PDM Professional Administration tool when you create a serial number generator.

Return codes:

  • S_OK: The method successfully executed.
  • E_EDM_INVALID_SERIAL_NUMBER_NAME: The bsSerNoName argument is invalid.

See Also


SOLIDWORKS PDM Professional Version 6.4

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

Subject:   Feedback on Help Topics
Page:   AllocSerNoValue Method (IEdmSerNoGen7)
*   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:


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

Web Help Content Version: API Help (English only) 2018 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.