Warning: This interface is not available with 2D Layout for 3D Design.
Properties
- Property ActiveView() As (Read Only)
-
Returns the active drawing view of the active drawing sheet.
Warning: This method is not available with 2D Layout for 3D Design.- Example:
-
The following example retrieves in ViewToWorkIn
the active drawing view
in the DrawingSheets collection of the document named CATDrawing1
Dim MyDrawingDoc As Document Set MyDrawingDoc = CATIA.Documents.Item("CATDrawing1") Dim ViewToWorkIn As DrawingView Set ViewToWorkIn = MyDrawingDoc.Sheets.ActiveSheet.DrawingViews.ActiveView
Methods
- Func Add( iDrawingViewName) As
-
Creates a drawing view and adds it to the drawing view collection.
This drawing view becomes the active one.
Warning: This method is not available with 2D Layout for 3D Design.- Parameters:
-
- iDrawingViewName
- The name to assign to the created drawing view dd>
- Returns:
- The created drawing view
- Example:
-
The following example creates a drawing view named LeftView
and retrieved in MyView
in the drawing view collection of the MySheet drawing sheet.
This sheet belongs to
the drawing sheet collection of the drawing document named
CATDrawing1.
Dim MyDrawingDoc As Document Set MyDrawingDoc = CATIA.Documents.Item("CATDrawing1") Dim MySheet As DrawingSheet Set MySheet = MyDrawingDoc.Sheets.Item("FirstSheet") Dim MyView As DrawingView Set MyView = MySheet.Views.Add("LeftView")
Warning: This method is not available with 2D Layout for 3D Design.
- Parameters:
-
- iIndex
- The index or the name of the drawing view to retrieve from the collection of drawing views. As a numerics, this index is the rank of the drawing view in the collection. The index of the first drawing view in the collection 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 the property or when creating it using the method. dd>
- Returns:
- The retrieved drawing view dd>
- Example:
-
This example retrieves in ThisDrawingView the second drawing view, and in ThatDrawingView the drawing view named MyView in the drawing view collection of the active sheet in the active document, supposed to be a drawing document.
Dim MySheet As DrawingSheet Set MySheet = CATIA.ActiveDocument.Sheets.ActiveSheet Dim ThisDrawingView As DrawingView Set ThisDrawingView = MySheet.Views.ActiveView.Item(2) Dim ThatDrawingView As DrawingView Set ThatDrawingView = MySheet.Views.ActiveView.Item("MyView")
Warning: This method is not available with 2D Layout for 3D Design and it's forbidden and not possible to delete main view and background view contained in this collection.
- Parameters:
-
- iIndex
- The index or the name of the drawing view to remove from the collection of drawing views. As a numerics, this index is the rank of the drawing view in the collection. The index of the first drawing view in the collection 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 the property or when creating it using the method.
- Example:
-
The following example removes the third drawing view and the drawing view
named TopView in the drawing view collection of the active sheet
of the active document, supposed to be a drawing document.
Dim MySheet As DrawingSheet Set MySheet = CATIA.ActiveDocument.Sheets.ActiveSheet MySheet.ActiveViews.Remove(3) MySheet.ActiveViews.Remove("TopView")