Solid Edge Draft Type Library
Number Property
Solid Edge Draft Type Library > Sheet Object : Number Property
Description
Index of sheet within section tab bar. This value is the same as the property text sheet number.
Property type
Read-write property
Syntax
Visual Basic
Public Property Number As Long
Remarks
This sheet number is only valid for the working and background sheets. All other sheets will always return 1 for the sheet number. Setting the sheet number for other sections will have no effect.
Example
Imports System.IO
Imports System.Runtime.InteropServices

Module Example
    <STAThread()> _
    Sub Main()
        Dim objApplication As SolidEdgeFramework.Application = Nothing
        Dim objDocuments As SolidEdgeFramework.Documents = Nothing
        Dim objDraftDocument As SolidEdgeDraft.DraftDocument = Nothing
        Dim objSections As SolidEdgeDraft.Sections = Nothing
        Dim objSection As SolidEdgeDraft.Section = Nothing
        Dim objSectionSheets As SolidEdgeDraft.SectionSheets = Nothing
        Dim objSheets As SolidEdgeDraft.Sheets = Nothing
        Dim objSheet As SolidEdgeDraft.Sheet = Nothing
        Dim i As Integer

        Try
            OleMessageFilter.Register()

            ' Start Solid Edge
            objApplication = Activator.CreateInstance(Type.GetTypeFromProgID("SolidEdge.Application"))
            objApplication.Visible = True
            objDocuments = objApplication.Documents
            objDraftDocument = objDocuments.Add("SolidEdge.DraftDocument")
            objSheets = objDraftDocument.Sheets
            objSections = objDraftDocument.Sections

            ' Default draft file has 1 sheet.  Add 9 new sheets.  Total will be 10.
            For i = 1 To 9
                objSheets.AddSheet(, SolidEdgeDraft.SheetSectionTypeConstants.igWorkingSection)
            Next

            objSection = objSections.WorkingSection
            objSectionSheets = objSection.Sheets

            ' To demonstrate, reverse the order of the sheets.
            ' We start with Sheet1 ~ Sheet10.  We end with Sheet10 ~ Sheet1
            For i = objSectionSheets.Count To 1 Step -1
                objSheet = objSectionSheets.Item(1)
                objSheet.Number = i
            Next

        Catch ex As Exception
            Console.WriteLine(ex.Message)
        Finally
            OleMessageFilter.Revoke()
        End Try
    End Sub
End Module
using System.IO;
using System.Runtime.InteropServices;

internal static class Example
{
    [STAThread()]
    public static void Main()
    {
        SolidEdgeFramework.Application objApplication = null;
        SolidEdgeFramework.Documents objDocuments = null;
        SolidEdgeDraft.DraftDocument objDraftDocument = null;
        SolidEdgeDraft.Sections objSections = null;
        SolidEdgeDraft.Section objSection = null;
        SolidEdgeDraft.SectionSheets objSectionSheets = null;
        SolidEdgeDraft.Sheets objSheets = null;
        SolidEdgeDraft.Sheet objSheet = null;
        int i = 0;

        try
        {
            OleMessageFilter.Register();

            // Start Solid Edge
            objApplication = Activator.CreateInstance(Type.GetTypeFromProgID("SolidEdge.Application"));
            objApplication.Visible = true;
            objDocuments = objApplication.Documents;
            objDraftDocument = objDocuments.Add("SolidEdge.DraftDocument");
            objSheets = objDraftDocument.Sheets;
            objSections = objDraftDocument.Sections;

            // Default draft file has 1 sheet.  Add 9 new sheets.  Total will be 10.
            for (i = 1; i <= 9; i++)
            {
                objSheets.AddSheet(, SolidEdgeDraft.SheetSectionTypeConstants.igWorkingSection);
            }

            objSection = objSections.WorkingSection;
            objSectionSheets = objSection.Sheets;

            // To demonstrate, reverse the order of the sheets.
            // We start with Sheet1 ~ Sheet10.  We end with Sheet10 ~ Sheet1
            for (i = objSectionSheets.Count; i >= 1; i--)
            {
                objSheet = objSectionSheets.Item(1);
                objSheet.Number = i;
            }

        }
        catch (Exception ex)
        {
            Console.WriteLine(ex.Message);
        }
        finally
        {
            OleMessageFilter.Revoke();
        }
    }
}
See Also

Sheet Object  | Sheet Members  | Solid Edge ST3 - What's New