Warning: This interface is not available with 2D Layout for 3D Design.
Properties
- Property ActiveSheet() As (Read Only)
-
Returns the active drawing sheet of the drawing document.
Warning: This method is not available with 2D Layout for 3D Design.- Example:
-
The following example retrieves in SheetToWorkIn
the active drawing sheet of the drawing document named CATDrawing1.
Dim MyDrawingDoc As Document Set MyDrawingDoc = CATIA.Documents.Item("CATDrawing1") Dim SheetToWorkIn As DrawingSheet Set SheetToWorkIn = MyDrawingDoc.Sheets.ActiveSheet
Methods
- Func Add( iDrawingSheetName) As
-
Creates a drawing sheet and adds it to the DrawingSheets collection.
This drawing sheet becomes the active one.
Warning: This method is not available with 2D Layout for 3D Design.- Parameters:
-
- iDrawingSheetName
- The name to assign to the created DrawingSheet object dd>
- Returns:
- The created drawing sheet
- Example:
-
The following example creates a drawing sheet named FirstSheet
and retrieved in MySheet
in the drawing sheet collection of the document named CATDrawing1.
Dim MyDrawingDoc As Document Set MyDrawingDoc = CATIA.Documents.Item("CATDrawing1") Dim MySheet As DrawingSheet Set MySheet = MyDrawingDoc.Sheets.Add("FirstSheet")
Warning: This method is not available with 2D Layout for 3D Design.
- Parameters:
-
- iDrawingSheetName
- The name to assign to the created detail DrawingSheet object dd>
- Returns:
- The created drawing sheet
- Example:
-
The following example creates a detail drawing sheet named FirstSheet
and retrieved in MySheet
in the drawing sheet collection of the document named CATDrawing1.
Dim MyDrawingDoc As Document Set MyDrawingDoc = CATIA.Documents.Item("CATDrawing1") Dim MySheet As DrawingSheet Set MySheet = MyDrawingDoc.Sheets.Add("FirstSheet")dd>
Warning: This method is not available with 2D Layout for 3D Design.
- Parameters:
-
- iIndex
- The index or the name of the drawing sheet to retrieve from the collection of drawing sheets. As a numerics, this index is the rank of the drawing sheet in the collection. The index of the first drawing sheet in the collection is 1, and the index of the last drawing sheet is Count. As a string, it is the name you assigned to the drawing sheet using the property or when creating it using the method. dd>
- Returns:
- The retrieved drawing sheet
- Example:
-
This example retrieves in ThisDrawingSheet the third drawing sheet,
and in ThatDrawingSheet the drawing sheet named
MySheet in the drawing sheet collection of the active document,
supposed to be a drawing document.
Dim ThisDrawingSheet As DrawingSheet Set ThisDrawingSheet = CATIA.ActiveDocument.Sheets.Item(3) Dim ThatDrawingSheet As DrawingSheet Set ThatDrawingSheet = CATIA.ActiveDocument.Sheets.Item("MySheet")dd>
Warning: This method is not available with 2D Layout for 3D Design.
- Parameters:
-
- iIndex
- The index or the name of the drawing sheet to remove from the collection of drawing sheets. As a numerics, this index is the rank of the drawing sheet in the collection. The index of the first drawing sheet in the collection is 1, and the index of the last drawing sheet is Count. As a string, it is the name you assigned to the drawing sheet using the property or when creating it using the method.
- Example:
-
The following example removes the second drawing sheet and the drawing sheet named
SheetToBeRemoved in the drawing sheet collection
of the active document, supposed to be a drawing document.
CATIA.ActiveDocument.DrawingSheets.Remove(2) CATIA.ActiveDocument.DrawingSheets.Remove("SheetToBeRemoved")dd>