pycatia.drafting_interfaces.drawing_views¶
Module initially auto generated using V5Automation files from CATIA V5 R28 on 2020-06-11 12:40:47.360445
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_interfaces.drawing_views.DrawingViews(com_object)¶
Note
CAA V5 Visual Basic Help (2020-06-11 12:40:47.360445)
System.IUnknownSystem.IDispatchSystem.CATBaseUnknownSystem.CATBaseDispatchSystem.CollectionDrawingViewsA collection of all the drawing views currently managed by a drawing sheet in adrawing document.Warning: This interface is not available with 2D Layout for 3DDesign.- property active_view: DrawingView¶
Note
- CAA V5 Visual Basic Help (2020-06-11 12:40:47.360445)
- o Property ActiveView() As DrawingView (Read Only)Returns the active drawing view of the active drawingsheet.Warning: This method is not available with 2D Layout for 3DDesign.Example:The following example retrieves in ViewToWorkIn the active drawing viewin the DrawingSheets collection of the document namedCATDrawing1Dim MyDrawingDoc As DocumentSet MyDrawingDoc = CATIA.Documents.Item(“CATDrawing1”)Dim ViewToWorkIn As DrawingViewSet ViewToWorkIn = MyDrawingDoc.Sheets.ActiveSheet.DrawingViews.ActiveView
- Return type:
- add(i_drawing_view_name: str) DrawingView ¶
Note
- CAA V5 Visual Basic Help (2020-06-11 12:40:47.360445))
- o Func Add(CATBSTR iDrawingViewName) As DrawingViewCreates a drawing view and adds it to the drawing view collection. Thisdrawing view becomes the active one.Warning: This method is not available with 2D Layout for 3DDesign.Parameters:iDrawingViewNameThe name to assign to the created drawing viewReturns:The created drawing viewExample:The following example creates a drawing view named LeftView and retrievedin MyView in the drawing view collection of the MySheet drawing sheet. Thissheet belongs to the drawing sheet collection of the drawing document namedCATDrawing1.Dim MyDrawingDoc As DocumentSet MyDrawingDoc = CATIA.Documents.Item(“CATDrawing1”)Dim MySheet As DrawingSheetSet MySheet = MyDrawingDoc.Sheets.Item(“FirstSheet”)Dim MyView As DrawingViewSet MyView = MySheet.Views.Add(“LeftView”)
- Parameters:
i_drawing_view_name (str) –
- Return type:
- item(i_index: cat_variant) DrawingView ¶
Note
- CAA V5 Visual Basic Help (2020-06-11 12:40:47.360445))
- o Func Item(CATVariant iIndex) As DrawingViewReturns a drawing view using its index or its name from the DrawingViewscollection.Warning: This method is not available with 2D Layout for 3DDesign.Parameters:iIndexThe index or the name of the drawing view to retrieve from thecollection of drawing views. As a numerics, this index is the rank of thedrawing view in the collection. The index of the first drawing view in thecollection is 1, and the index of the last drawing view is Count. As a string,it is the name you assigned to the drawing view using theAnyObject.Name property or when creating it using the Add method.Returns:The retrieved drawing viewExample:This example retrieves in ThisDrawingView the second drawingview,and in ThatDrawingView the drawing view namedMyView in the drawing view collection of the activesheetin the active document, supposed to be a drawingdocument.Dim MySheet As DrawingSheetSet MySheet = CATIA.ActiveDocument.Sheets.ActiveSheetDim ThisDrawingView As DrawingViewSet ThisDrawingView = MySheet.Views.ActiveView.Item(2)Dim ThatDrawingView As DrawingViewSet ThatDrawingView = MySheet.Views.ActiveView.Item(“MyView”)
- Parameters:
i_index (cat_variant) –
- Return type:
- remove(i_index: cat_variant) None ¶
Note
- CAA V5 Visual Basic Help (2020-06-11 12:40:47.360445))
- o Sub Remove(CATVariant iIndex)Removes a drawing view from the DrawingViews collection.Warning: This method is not available with 2D Layout for 3D Design and it’sforbidden and not possible to delete main view and background view contained inthis collection.Parameters:iIndexThe index or the name of the drawing view to remove from thecollection of drawing views. As a numerics, this index is the rank of thedrawing view in the collection. The index of the first drawing view in thecollection is 1, and the index of the last drawing view is Count. As a string,it is the name you assigned to the drawing view using theAnyObject.Name property or when creating it using the Add method.Example:The following example removes the third drawing view and the drawing viewnamed TopView in the drawing view collection of the active sheet of the activedocument, supposed to be a drawing document.Dim MySheet As DrawingSheetSet MySheet = CATIA.ActiveDocument.Sheets.ActiveSheetMySheet.ActiveViews.Remove(3)MySheet.ActiveViews.Remove(“TopView”)
- Parameters:
i_index (cat_variant) –
- Return type:
None