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.IUnknownSystem.IDispatchSystem.CATBaseUnknownSystem.CATBaseDispatchSystem.CollectionLayout2DSheetsA collection of all the Layout sheets 2DL currently managed by theLayoutRoot.- 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 retrievedin MySheet in the Layout sheet collection of the layout root of Part supposedto be in the active documentDim MyLayoutRoot As Layout2DRootSet MyLayoutRoot = CATIA.Documents.Part.GetItem(“CATLayoutRoot”)Dim MySheet As Layout2DSheetSet MySheet = MyLayoutRoot.Sheets.ActiveSheet
- Return type:
- 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 Layout2DSheetCreates a Layout sheet and adds it to the Layout2DSheets collection. ThisLayout sheet becomes the active one.Parameters:iLayoutSheetNameThe name to assign to the created Layout2DSheet objectReturns:The created Layout sheetExample:The following example creates a Layout sheet named FirstSheet andretrieved in MySheet in the Layout sheet collection of the layout root of Partsupposed to be in the active documentDim MyLayoutRoot As Layout2DRootSet MyLayoutRoot = CATIA.Documents.Part.GetItem(“CATLayoutRoot”)Dim MySheet As Layout2DSheetSet MySheet = MyLayoutRoot.Sheets.Add(“FirstSheet”).
- Parameters:
i_layout_sheet_name (str) –
- Return type:
- 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 Layout2DSheetCreates a detail Layout sheet 2DL and adds it to the LayoutSheets2DLcollection. This detail Layout sheet becomes the activeone.Parameters:iLayoutSheetNameThe name to assign to the created detail LayoutSheet objectReturns:The created layout sheetExample:The following example creates a detail Layout sheet named FirstSheetand retrieved in MySheet in the Layout sheet collection of the layout root ofPart supposed to be in the active documentDim MyLayoutRoot As Layout2DRootSet MyLayoutRoot = CATIA.Documents.Part.GetItem(“CATLayoutRoot”)Dim MySheet As Layout2DSheetSet MySheet = MyLayoutRoot.Sheets.Add(“FirstSheet”)
- Parameters:
i_layout_sheet_name (str) –
- Return type:
- 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 Layout2DSheetReturns a Layout sheet using its index or its name from the Layout2DSheetscollection.Parameters:iIndexThe index or the name of the Layout sheet to retrieve from thecollection of Layout sheets. As a numerics, this index is the rank of theLayout sheet in the collection. The index of the first Layout sheet in thecollection 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 theAnyObject.Name property or when creating it using the Add method.Returns:The retrieved Layout sheetExample:This example retrieves in ThisLayoutSheet the third Layout sheet, andin ThatLayoutSheet the Layout sheet named MySheet in the Layout sheetcollection of the layout root of Part supposed to be in the activedocument.Dim ThisLayoutRoot As Layout2DRootSet ThisLayoutRoot = CATIA.ActiveDocument.Part.GetItem(“CATlayoutRoot”)Dim ThisLayoutSheet As Layout2DSheetSet ThisLayoutSheet = ThisLayoutRoot.Sheets.Item(3)Dim ThatLayoutSheet As Layout2DSheetSet ThatLayoutSheet = ThisLayoutRoot.Sheets.Item(“MySheet”)
- Parameters:
i_index (cat_variant) –
- Return type:
- 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 Layout2DSheetscollection.Parameters:iIndexThe index or the name of the Layout sheet to remove from thecollection of Layout sheets. As a numerics, this index is the rank of theLayout sheet in the collection. The index of the first Layout sheet in thecollection 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 theAnyObject.Name property or when creating it using the Add method.Example:The following example removes the second Layout sheet and the Layoutsheet named SheetToBeRemoved in the Layout sheet collection of the layout rootof Part supposed to be in the active document.Dim ThisLayoutRoot As Layout2DRootSet ThisLayoutRoot = CATIA.ActiveDocument.Part.GetItem(“CATlayoutRoot”)
ThisLayoutRoot.Layout2DSheets.Remove(“SheetToBeRemoved”)
- param cat_variant i_index:
- rtype:
None