Properties
- Property ActiveSheet() As (Read Only)
-
Returns the active Layout sheet of the Layout document.
- Example:
-
The following example shows how to get the active sheet
and retrieved in MySheet in the Layout sheet collection of the layout root of Part
supposed to be in the active document
Dim MyLayoutRoot As Layout2DRoot Set MyLayoutRoot = CATIA.Documents.Part.GetItem("CATLayoutRoot") Dim MySheet As Layout2DSheet Set MySheet = MyLayoutRoot.Sheets.ActiveSheet
Methods
- Func Add( iLayoutSheetName) As
-
Creates a Layout sheet and adds it to the Layout2DSheets collection.
This Layout sheet becomes the active one.
- Parameters:
-
- iLayoutSheetName
- The name to assign to the created Layout2DSheet object dd>
- Returns:
- The created Layout sheet
- Example:
-
The following example creates a Layout sheet named FirstSheet
and retrieved in MySheet in the Layout sheet collection of the layout root of Part
supposed to be in the active document
Dim MyLayoutRoot As Layout2DRoot Set MyLayoutRoot = CATIA.Documents.Part.GetItem("CATLayoutRoot") Dim MySheet As Layout2DSheet Set MySheet = MyLayoutRoot.Sheets.Add("FirstSheet").
- Parameters:
-
- iLayoutSheetName
- The name to assign to the created detail LayoutSheet object dd>
- Returns:
- The created layout sheet
- Example:
-
The following example creates a detail Layout sheet named FirstSheet
and retrieved in MySheet in the Layout sheet collection of the layout root of Part
supposed to be in the active document
Dim MyLayoutRoot As Layout2DRoot Set MyLayoutRoot = CATIA.Documents.Part.GetItem("CATLayoutRoot") Dim MySheet As Layout2DSheet Set MySheet = MyLayoutRoot.Sheets.Add("FirstSheet")dd>
- Parameters:
-
- iIndex
- The index or the name of the Layout sheet to retrieve from the collection of Layout sheets. As a numerics, this index is the rank of the Layout sheet in the collection. The index of the first Layout sheet in the collection is 1, and the index of the last Layout sheet is Count. As a string, it is the name you assigned to the Layout sheet using the property or when creating it using the method. dd>
- Returns:
- The retrieved Layout sheet
- Example:
-
This example retrieves in ThisLayoutSheet the third Layout sheet,
and in ThatLayoutSheet the Layout sheet named
MySheet in the Layout sheet collection of the layout root of Part
supposed to be in the active document.
Dim ThisLayoutRoot As Layout2DRoot Set ThisLayoutRoot = CATIA.ActiveDocument.Part.GetItem("CATlayoutRoot") Dim ThisLayoutSheet As Layout2DSheet Set ThisLayoutSheet = ThisLayoutRoot.Sheets.Item(3) Dim ThatLayoutSheet As Layout2DSheet Set ThatLayoutSheet = ThisLayoutRoot.Sheets.Item("MySheet")dd>
- Parameters:
-
- iIndex
- The index or the name of the Layout sheet to remove from the collection of Layout sheets. As a numerics, this index is the rank of the Layout sheet in the collection. The index of the first Layout sheet in the collection is 1, and the index of the last Layout sheet is Count. As a string, it is the name you assigned to the Layout sheet using the property or when creating it using the method.
- Example:
-
The following example removes the second Layout sheet and the Layout sheet named
SheetToBeRemoved in the Layout sheet collection of the layout root of Part
supposed to be in the active document.
Dim ThisLayoutRoot As Layout2DRoot Set ThisLayoutRoot = CATIA.ActiveDocument.Part.GetItem("CATlayoutRoot") ThisLayoutRoot.Layout2DSheets.Remove("SheetToBeRemoved")dd>