pycatia.drafting_2dL_interfaces.layout_2d_views¶
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_views.Layout2DViews(com_object)¶
Note
CAA V5 Visual Basic Help (2020-09-25 14:34:21.593357)
System.IUnknownSystem.IDispatchSystem.CATBaseUnknownSystem.CATBaseDispatchSystem.CollectionLayout2DViews- property active_view: Layout2DView¶
Note
- CAA V5 Visual Basic Help (2020-09-25 14:34:21.593357)
- o Property ActiveView() As Layout2DView (Read Only)Returns the active Layout2D view of the active Layout2Dsheet.Example:The following example retrieves in ViewToWorkIn the active Layout2Dview in the Layout2DSheets collection of thelayoutRootDim MyRoot As Layout2DRootSet MyRoot = CATIA.Documents.Part.GetItem(“CATLayoutRoot”)Dim ViewToWorkIn As Layout2DViewSet ViewToWorkIn = MyRoot.Sheets.ActiveSheet.Layout2DViews.ActiveView
- Return type:
- add_auxiliary(i_reference_view: Layout2DView, i_bc_segment: tuple, i_xorient: float, i_yorient: float, i_section_type: int, i_x: float, i_y: float) Layout2DView ¶
Note
- CAA V5 Visual Basic Help (2020-09-25 14:34:21.593357))
- o Func AddAuxiliary(Layout2DView iReferenceView,CATSafeArrayVariant iBCSegment,double iXorient,double iYorient,CatViewType iSectionType,double iX,double iY) As Layout2DViewCreates a section or section-cut or auxiliary View2DL from a given LayoutView2DL. The View2DL must be in this collection. Caracteristics of new view(view plane etc) are computed based on the given basic callout and referenceview 2DL viewplane.Precondition : 1/ The reference View2DL must be in this collectionPrecondition : 2/ The reference View2DL must be a projection view.Precondition : 3/ The callout segment’s length must not be 0.Precondition : 4/ iViewType must be either auxiliary or section or section cut.Parameters:iReferenceView[in] The reference view. Must be a projection View.iBCSegment[in] The callout’s segment gives the trace of the auxiliaryView2DL’s projection plane in the reference View2DL. It has the followingcontents:iBCSegment[0] = X1x coordinate of the first pointiBCSegment[1] = Y1y coordinate of the first pointiBCSegment[2] = X2x coordinate of the second pointiBCSegment[3] = Y2y coordinate of the second pointiBCOrient[in] The callout’s orientation gives the direction taken intoaccount when Layout2D the auxilliary View2DL.iXorient[in]iYorient[in] This point determine the type taken into account when Layout2Dthe auxilliary View2DL.iSectionTypeiX[in]iY[in] The coordinate in the Sheet2DL for the new View2DL.Returns:The created Layout2D viewExample:The following example creates a Layout2D view named from the active viewand retrieved in MyView in the Layout2D view collection of the MySheet Layout2Dsheet. This sheet belongs to the Layout2D sheet collection of thelayoutRootDim x As doubleSet x = 10.Dim y As doubleSet y = 10.Dim MySegmentReDim MySegment(3)MySegment(0) = 10.MySegment(1) = 200.MySegment(2) = 100.MySegment(3) = 200.Dim MyRoot As Layout2DRootSet MyRoot = CATIA.Documents.Part.GetItem(“CATLayoutRoot”)Dim MyFirstView As Layout2DViewSet MyFirstView = MyRoot.Sheets.ActiveSheet.Views.ActiveViewDim MyView As Layout2DViewSet MyView = MyRoot.Sheets.ActiveSheet.Views.
- Parameters:
i_reference_view (Layout2DView) –
i_bc_segment (tuple) –
i_xorient (float) –
i_yorient (float) –
i_section_type (int) – enum cat_view_type
i_x (float) –
i_y (float) –
- Return type:
- add_detail(i_detail_name: str) Layout2DView ¶
Note
- CAA V5 Visual Basic Help (2020-09-25 14:34:21.593357))
- o Func AddDetail(CATBSTR iDetailName) As Layout2DViewCreates a detail view and adds it to the layout view collection. Thislayout view becomes the active one.Precondition : The collection view must be a Detail SheetParameters:iDetailNameThe name to assign to the created layout viewReturns:The created layout viewExample:The following example creates a detail view namedDittoand retrieved in MyView in the layout view collectionof the MyDetailSheet layout sheet. WhereMyDetailSheetis the active sheet of the layout sheet collection of the layoutrootDim MyLayoutRoot As Layout2DRootSet MyLayoutRoot = CATIA.Documents.Part.GetItem(“CATLayoutRoot”)Dim MyDetailSheet As Layout2DSheetSet MyDetailSheet = .Sheets.ActiveSheetDim MyView As Layout2DViewSet MyView = MyDetailSheet.Views.AddDetail(“Ditto”)Dim MyView As Layout2DView Set MyView = CATIA.ActiveDocument.Part.GetItem(“CATLayoutRoot”).Sheets.ActiveSheet. Views.AddDetail()
- Parameters:
i_detail_name (str) –
- Return type:
- add_from_3d_plane(i_plane: tuple, i_view_type: int, i_x: float, i_y: float) Layout2DView ¶
Note
- CAA V5 Visual Basic Help (2020-09-25 14:34:21.593357))
- o Func AddFrom3DPlane(CATSafeArrayVariant iPlane,CatViewType iViewType,double iX,double iY) As Layout2DViewCreates a viewFrom3D View2DL with the given 3Dplane as its view plane atthe given position in the given Sheet2DL.Parameters:iPlane[in] Define the plane on wich the view as to be created It has thefollowing contents:iPlane[0] = Xx coordinate of plane origin in 3D spaceiPlane[1] = Yy coordinate of plane origin in 3D spaceiPlane[2] = Zz coordinate of plane origin in 3D spaceiPlane[3] = H1Define the direction which the view’s viewplane HiPlane[4] = H2axis has to be colinear withiPlane[5] = H3iPlane[6] = V1Define the direction which the view’s viewplane ViPlane[7] = V2axis has to be colinear withiPlane[8] = V3Precondition : 1/iViewType must be either auxiliary or section or section cut.Precondition : 2/ iFirstDirection and iSecondDirection must be orthogonal.iViewTypeThe view type: catAuxiliary or catSectionCut or catSectionViewiX[in]iY[in] The coordinate of the new View2DL in the Sheet2DLReturns:The created Layout2D view
- Parameters:
i_plane (tuple) –
i_view_type (int) – enum cat_view_type
i_x (float) –
i_y (float) –
- Return type:
- add_primary(i_x: float, i_y: float) Layout2DView ¶
Note
- CAA V5 Visual Basic Help (2020-09-25 14:34:21.593357))
- o Func AddPrimary(double iX,double iY) As Layout2DViewCreates a Layout view and adds it to the Layout view collection. ThisLayout view becomes the active one.Parameters:iX[in]iY[in] The coordinate in the Sheet2DL for the new View2DL.Returns:The created Layout2D viewExample:The following example creates a Layout2D view and retrieved in MyView inthe Layout2D view collection of the Layout2D sheet. This sheet belongs to theLayout2D sheet collection.Dim x as doubleSet x = 10.Dim y as doubleSet y = 10.Dim MyView As Layout2DViewSet MyView = CATIA.ActiveDocument.Part.GetItem(“CATLayoutRoot”).Sheets.ActiveSheet.Views.AddPrimary(x, y).
- Parameters:
i_x (float) –
i_y (float) –
- Return type:
Note
- CAA V5 Visual Basic Help (2020-09-25 14:34:21.593357))
- o Func AddRelated(Layout2DView iReferenceView,CatViewSide iSide,double iX,double iY) As Layout2DViewCreates a projection or isometric Layout View2DL from a given View2DL. Theview will be created in the same collection as the given View2DL, at the givenposition. The caracteristics (ex: view plane etc) of this new View2DL arecomputed based on the caracteristics stored in the ViewBox its iReferenceViewis associated with.Parameters:iReferenceView[in] The reference View2DL from which the new View2DL is created.iSide[in] Used with the ViewBox and iReferenceView to give the relatedview to create (type etc).iX[in]iY[in] The coordinate in the Sheet2DL for the new View2DL.Returns:The created Layout2D viewPrecondition : The reference View2DL must be in this collectionExample:The following example creates a Layout2D view named from the active viewand retrieved in MyView in the Layout2D view collection of the MySheet Layout2Dsheet. This sheet belongs to the Layout2D sheet collection of thelayoutRoot.Dim x as doubleSet x = 10.Dim y as doubleSet y = 10.Dim MyFirstView As Layout2DViewSet MyFirstView = CATIA.ActiveDocument.Part.GetItem(“CATLayoutRoot”).Sheets.ActiveSheet.Views.ActiveViewDim MyView As Layout2DViewSet MyView = CATIA.ActiveDocument.Part.GetItem(“CATLayoutRoot”).Sheets.ActiveSheet.Views.AddRelated(MyFirstView,catLeftSide, x, y)
- Parameters:
i_reference_view (Layout2DView) –
i_side (int) – enum cat_view_side
i_x (float) –
i_y (float) –
- Return type:
- item(i_index: cat_variant) Layout2DView ¶
Note
- CAA V5 Visual Basic Help (2020-09-25 14:34:21.593357))
- o Func Item(CATVariant iIndex) As Layout2DViewReturns a Layout2D view using its index or its name from the Layout2DViewscollection.Parameters:iIndexThe index or the name of the Layout2D view to retrieve from thecollection of Layout2D views. As a numerics, this index is the rank of theLayout2D view in the collection. The index of the first Layout2D view in thecollection is 1, and the index of the last Layout2D view is Count. As a string,it is the name you assigned to the Layout2D view using theAnyObject.Name property or when creating it using the Add method.Returns:The retrieved Layout2D viewExample:This example retrieves in ThisLayout2DView the second Layout2Dview,and in ThatLayout2DView the Layout2D view namedMyView in the Layout2D view collection of the active sheet of alayoutRootof a part of the active document, supposed to be a partdocument.Dim MySheet As Layout2DSheetSet MySheet = CATIA.ActiveDocument.Part.GetItem(“CATLayoutRoot”).Sheets.ActiveSheetDim ThisLayout2DView As Layout2DViewSet ThisLayout2DView = MySheet.Views.ActiveView.Item(2)Dim ThatLayout2DView As Layout2DViewSet ThatLayout2DView = 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-09-25 14:34:21.593357))
- o Sub Remove(CATVariant iIndex)Removes a layout2D view from the Layout2DViews collection.Parameters:iIndexThe index or the name of the Layout2D view to remove from thecollection of Layout2D views. As a numerics, this index is the rank of theLayout2D view in the collection. The index of the first Layout2D view in thecollection is 1, and the index of the last Layout2D view is Count. As a string,it is the name you assigned to the Layout2D view using theAnyObject.Name property or when creating it using the Add method.Example:The following example removes the third Layout2D view and the Layout2D viewnamed TopView in the Layout2D view collection of the active sheet of alayoutRoot of a part of the active document, supposed to be a partdocument.Dim MySheet As Layout2DSheetSet MySheet = CATIA.ActiveDocument.Part.GetItem(“CATLayoutRoot”).Sheets.ActiveSheetMySheet.ActiveViews.Remove(3)MySheet.ActiveViews.Remove(“TopView”)
- Parameters:
i_index (cat_variant) –
- Return type:
None