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.

Syntax

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
C# 
IEdmSerNoValue AllocSerNoValue( 
   System.string bsSerNoName,
   System.int lParentWnd,
   System.string bsFilePath,
   System.int lFolderID,
   System.int lFileID,
   System.int lCardID,
   System.int lCardControlID
)
C++/CLI 
IEdmSerNoValue^ AllocSerNoValue( 
&   System.String^ bsSerNoName,
&   System.int lParentWnd,
&   System.String^ bsFilePath,
&   System.int lFolderID,
&   System.int lFileID,
&   System.int lCardID,
&   System.int lCardControlID
) 

Parameters

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

Return Value

IEdmSerNoValue

Example

Remarks

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 Enterprise PDM 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

Availability

SOLIDWORKS Enterprise PDM 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

 
*Email:  
Subject:   Feedback on Help Topics
Page:   AllocSerNoValue Method (IEdmSerNoGen7)
*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: API Help (English only) 2015 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.