combit List & Label 29 - .NET Help
combit.Reporting Namespace / FileExtensions Class / SetFileExtension Method
Project type (List, Label or Card) the file extension is to be queried for.
Type of the project file.
File extension (without point).
Example


In This Topic
    SetFileExtension Method
    In This Topic
    Defines the file extension for the given project type.
    Syntax
    'Declaration
     
    
    Public Sub SetFileExtension( _
       ByVal projectType As LlProject, _
       ByVal fileType As LlFileType, _
       ByVal extension As String _
    ) 
    public void SetFileExtension( 
       LlProject projectType,
       LlFileType fileType,
       string extension
    )
    public:
    void SetFileExtension( 
       LlProject projectType,
       LlFileType fileType,
       String^ extension
    ) 

    Parameters

    projectType
    Project type (List, Label or Card) the file extension is to be queried for.
    fileType
    Type of the project file.
    extension
    File extension (without point).
    Exceptions
    ExceptionDescription
    If an unsupported type of LLProject or another LlFileType is queried.
    If an already existing file extension is defined for another project type.
     
     
    Remarks
    The file extension to be set must be unique within the project types. Otherwise the LL_FileExists_Exception will be thrown.
    Example
    Below the file extensions for list projects are changed.
    // set file extension for list projects
    LL.FileExtensions.SetFileExtension(LlProject.List, LlFileType.Project, "rpt");
    LL.FileExtensions.SetFileExtension(LlProject.List, LlFileType.PrinterSettings, "rpp");
    LL.FileExtensions.SetFileExtension(LlProject.List, LlFileType.Sketch, "rpv");
    ' set file extension for list projects
    LL.FileExtensions.SetFileExtension(LlProject.List, LlFileType.Project, "rpt")
    LL.FileExtensions.SetFileExtension(LlProject.List, LlFileType.PrinterSettings, "rpp")
    LL.FileExtensions.SetFileExtension(LlProject.List, LlFileType.Sketch, "rpv")
    Requirements

    Platforms: Windows 10 (Version 21H2 - 23H2), Windows 11 (21H2 - 22H2), Windows Server 2016 - 2022
    .NET: .NET Framework 4.8, .NET 6, .NET 7, .NET 8

    See Also