Hide Table of Contents
GenerateSerNo Method (IEdmSerNoGen6)

Obsolete. Superseded by IEdmSerNoGen7::AllocSerNoValue.


Visual Basic (Declaration) 
Function GenerateSerNo( _
   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 System.String
System.string GenerateSerNo( 
   System.string bsSerNoName,
   System.int lParentWnd,
   System.string bsFilePath,
   System.int lFolderID,
   System.int lFileID,
   System.int lCardID,
   System.int lCardControlID
System.String^ GenerateSerNo( 
&   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

Serial number value


This method is superseded by IEdmSerNoGen7:AllocSerNoValue which provides the ability to push back serial numbers that you don't need using IEdmSerNoValue.

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.0

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:   GenerateSerNo Method (IEdmSerNoGen6)
*   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.