pycatia.drafting_2dL_interfaces.layout_2d_sheets

Module initially auto generated using V5Automation files from CATIA V5 R28 on 2020-09-25 14:34:21.593357

Warning

The notes denoted “CAA V5 Visual Basic Help” are to be used as reference only. They are there as a guide as to how the visual basic / catscript functions work and thus help debugging in pycatia.

class pycatia.drafting_2dL_interfaces.layout_2d_sheets.Layout2DSheets(com_object)

Note

CAA V5 Visual Basic Help (2020-09-25 14:34:21.593357)

System.IUnknown
System.IDispatch
System.CATBaseUnknown
System.CATBaseDispatch
System.Collection
Layout2DSheets

A collection of all the Layout sheets 2DL currently managed by the
LayoutRoot.
property active_sheet: Layout2DSheet

Note

CAA V5 Visual Basic Help (2020-09-25 14:34:21.593357)
o Property ActiveSheet() As Layout2DSheet (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
Return type:

Layout2DSheet

add(i_layout_sheet_name: str) Layout2DSheet

Note

CAA V5 Visual Basic Help (2020-09-25 14:34:21.593357))
o Func Add(CATBSTR iLayoutSheetName) As Layout2DSheet

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


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:

i_layout_sheet_name (str) –

Return type:

Layout2DSheet

add_detail(i_layout_sheet_name: str) Layout2DSheet

Note

CAA V5 Visual Basic Help (2020-09-25 14:34:21.593357))
o Func AddDetail(CATBSTR iLayoutSheetName) As Layout2DSheet

Creates a detail Layout sheet 2DL and adds it to the LayoutSheets2DL
collection. This detail Layout sheet becomes the active
one.

Parameters:

iLayoutSheetName
The name to assign to the created detail LayoutSheet object


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”)
Parameters:

i_layout_sheet_name (str) –

Return type:

Layout2DSheet

item(i_index: cat_variant) Layout2DSheet

Note

CAA V5 Visual Basic Help (2020-09-25 14:34:21.593357))
o Func Item(CATVariant iIndex) As Layout2DSheet

Returns a Layout sheet using its index or its name from the Layout2DSheets
collection.

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


AnyObject.Name property or when creating it using the Add method.

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”)
Parameters:

i_index (cat_variant) –

Return type:

Layout2DSheet

remove(i_index: cat_variant) None

Note

CAA V5 Visual Basic Help (2020-09-25 14:34:21.593357))
o Sub Remove(CATVariant iIndex)

Removes a Layout2Dsheet from the Layout2DSheets
collection.

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


AnyObject.Name property or when creating it using the Add 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”)

param cat_variant i_index:

rtype:

None