<xml> </xml>

SOLIDWORKS PDM Professional API Help | Send Feedback
GenerateSerNo Method (IEdmSerNoGen6)
See Also

Collapse All Expand All Language Filter: All Language Filter: Multiple Language Filter: Visual Basic Language Filter: C# Language Filter: C++/CLI

EPDM.Interop.epdm Namespace > IEdmSerNoGen6 Interface : GenerateSerNo Method (IEdmSerNoGen6)

Visual Basic
C#
C++/CLI

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

Obsolete. Superseded by IEdmSerNoGen7::AllocSerNoValue .

# Syntax

Visual Basic |
--- | ---

    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

C# |
--- | ---

    System.string GenerateSerNo(
       System.string bsSerNoName,
       System.int lParentWnd,
       System.string bsFilePath,
       System.int lFolderID,
       System.int lFileID,
       System.int lCardID,
       System.int lCardControlID
    )

C++/CLI |
--- | ---

    System.String^ GenerateSerNo(
    &   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

Serial number value

# Remarks

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

####

IEdmSerNoGen6 Interface
IEdmSerNoGen6 Members

# Availability

SOLIDWORKS PDM Professional Version 6.0