GetSheets Method (IDocument)

GetSheets Method (IDocument) | Send Feedback
See Also Example

SheetArray[out]
  Array of Sheets

Obsolete. Superseded by IDocument::GetSheets2.

# Syntax

Visual Basic |
--- | ---
    Function GetSheets() As System.Object

C# |
--- | ---
    System.object GetSheets()

JavaScript |
--- | ---
    GetSheets() : Array

COM native C++ |
--- | ---
    HRESULT GetSheets(
       VARIANT* SheetArray
    )

C++ |
--- | ---
    DSRESULT GetSheets(
       dsObjectPtrArray* SheetArray
    )

#### Parameters

SheetArray[out] or Return Value
  Array of Sheets

# Example

This code snippet shows how to get the Sheets in a document.

#### COM native C++

> _variant_t pVariantArray = dsDoc->GetSheets();
> if( V_VT( &pVariantArray ) != VT_EMPTY )

> {

> . . .

> }

# Example

Switch Layouts (C#)
Switch Layouts (VB.NET)
Switch Layouts (VBA)
Create Rectangular Viewport (C#)
Create Rectangular Viewport (VB.NET)
Create Rectangular Viewport (VBA)
Create Rectangular Viewport (JavaScript)

# Remarks

The model is the first element in the array. To get the first Sheet in the array, either:

- explicitly get the second element in the array.
- use ISheet::Name and iterate through the array to get the first element in the array not named Model.

# See Also

####

IDocument Interface
IDocument Members
IDocument::CopySheet Method ()
IDocument::CreateSheet Method ()
IDocument::CreateSheetByTemplate Method ()
IDocument::GetSheet Method ()
IDocument::HasSheet Method ()
IDocument::RemoveSheet Method ()

# Availability

DraftSight V1R1