pycatia.drafting_2dL_interfaces.layout_2d_view¶
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_view.Layout2DView(com_object)¶
Note
CAA V5 Visual Basic Help (2020-09-25 14:34:21.593357)
System.IUnknownSystem.IDispatchSystem.CATBaseUnknownSystem.CATBaseDispatchSystem.AnyObjectLayout2DViewThe interface to access a Layout2D View.- activate() None ¶
Note
- CAA V5 Visual Basic Help (2020-09-25 14:34:21.593357))
- o Sub Activate()Activates the Layout2D view. Activating a Layout2D view means that thisLayout2D view is the one on which the end-user is nowworking.Example:This example activates the ViewToWorkOn Layout2D view.ViewToWorkOn.Activate()
- Return type:
None
- aligned_with_reference_view() None ¶
Note
- CAA V5 Visual Basic Help (2020-09-25 14:34:21.593357))
- o Sub AlignedWithReferenceView()Activates the alignment with the reference view. Activating the alignmentwith the reference view restores the constraints that the reference viewimposes to the current Layout2D view.Example:This example activates the alignment from the MyView Layout2D view toits reference view.MyView.AlignedWithReferenceView()
- Return type:
None
- property angle: float¶
Note
- CAA V5 Visual Basic Help (2020-09-25 14:34:21.593357)
- o Property Angle() As doubleReturns or sets the angle of the Layout2D view. The angle is measuredbetween the axis system of the Layout2D view and the axis system of theLayout2D sheet where the Layout2D view lies. The angle is measured in radiansand is counted counterclockwise.Example:This example sets the angle of the MyView Layout2D view to 90 degreesclockwise. You first need to compute the angle in radians and set the minussign to indicate the rotation is clockwise.PI = 3.1415926535Angle90Clockwise = -PI/2MyView.Angle = Angle90Clockwise
- Return type:
float
- property arrows: DrawingArrows¶
Note
- CAA V5 Visual Basic Help (2020-09-25 14:34:21.593357)
- o Property Arrows() As DrawingArrows (Read Only)Returns the drawing arrow collection of the Layout2D view.Example:This example retrieves in ArrowCollection the collection of arrows ofthe MyView Layout2D view.Dim ArrowCollection As DrawingArrowsSet ArrowCollection = MyView.Arrows
- Return type:
- property components: DrawingComponents¶
Note
- CAA V5 Visual Basic Help (2020-09-25 14:34:21.593357)
- o Property Components() As DrawingComponents (Read Only)Returns the Layout2D component instances collection (i.e. ditto collection)of the Layout2D view.Example:This example retrieves in ComponentCollection the collection ofcomponent instances of the MyView Layout2D view.Dim ComponentCollection As DrawingComponentsSet ComponentCollection = MyView.Components
- Return type:
- property dimensions: DrawingDimensions¶
Note
- CAA V5 Visual Basic Help (2020-09-25 14:34:21.593357)
- o Property Dimensions() As DrawingDimensions (Read Only)Returns the drawing dimension collection of the Layout2Dview.Example:This example retrieves in DimensionCollection the collection ofdimensions of the MyView Layout2D view.Dim DimensionCollection As DrawingDimensionsSet DimensionCollection = MyView.Dimensions
- Return type:
- property factory_2d: Factory2D¶
Note
- CAA V5 Visual Basic Help (2020-09-25 14:34:21.593357)
- o Property Factory2D() As Factory2D (Read Only)Returns the 2D factory of the Layout2D view. Take care that you must openedition on a sketch before adding or modifying elements in it. Take care thatyou must close edition on a sketch to keep all modifications before savingdocument. To get Sketch from factory2D:Set mySketch = my2DFactory.GetParentExample:The following example returns in my2DFactory the 2Dfactoryof the view myView:Set my2DFactory = myView.Factory2D
- Return type:
- property frame_visualization: bool¶
Note
- CAA V5 Visual Basic Help (2020-09-25 14:34:21.593357)
- o Property FrameVisualization() As booleanReturns or sets the Layout2D view frame visualizationstate.True if the Layout2D view frame is visible.Example:This example shows the frame of the MyView Layout2Dview.MyView.FrameVisualization = True
- Return type:
bool
- property geometric_elements: GeometricElements¶
Note
- CAA V5 Visual Basic Help (2020-09-25 14:34:21.593357)
- o Property GeometricElements() As GeometricElements (ReadOnly)Returns the collection of geometric elements included in the Layout2D viewsketch.Example:The following example returns in colGeometry the list of geometricelements in the view myView:Dim colGeometry As GeometricElementsSet colGeometry = MyView.GeometricElements
- Return type:
- get_view_name(i_view_name_prefix: str, i_view_name_ident: str, i_view_name_suffix: str) None ¶
Note
- CAA V5 Visual Basic Help (2020-09-25 14:34:21.593357))
- o Sub GetViewName(CATBSTR iViewNamePrefix,CATBSTR iViewNameIdent,CATBSTR iViewNameSuffix)Returns the prefix, the ident and the suffix of the name of the Layout2Dview. The method returns an error in case of 2D component reference. Do notconfuse with the method Name which can be different.Example:This example gets the prefix, the ident, and the suffix of the nameof the MyView Layout2D viewDim MyPrefix, MyIdent, MySuffix As CATBSTRMyView.GetViewName (MyPrefix, MyIdent, MySuffix)
- Parameters:
i_view_name_prefix (str) –
i_view_name_ident (str) –
i_view_name_suffix (str) –
- Return type:
None
- property lock_status: bool¶
Note
- CAA V5 Visual Basic Help (2020-09-25 14:34:21.593357)
- o Property LockStatus() As booleanReturns or sets the lock status of a Layout2D view.precondition: This property does not exist for the detail view. In thiscase, the method returns failed.Example:This example locks the ViewToWorkOn Layout2D view.ViewToWorkOn.LockStatus = True
- Return type:
bool
- property pictures: DrawingPictures¶
Note
- CAA V5 Visual Basic Help (2020-09-25 14:34:21.593357)
- o Property Pictures() As DrawingPictures (Read Only)Returns the drawing picture collection of the Layout2Dview.Example:This example retrieves in PictureCollection the collection of picturesof the MyView Layout2D view.Dim PictureCollection As DrawingPicturesSet PictureCollection = MyView.Pictures
- Return type:
- property reference_view: Layout2DView¶
Note
- CAA V5 Visual Basic Help (2020-09-25 14:34:21.593357)
- o Property ReferenceView() As Layout2DViewReturns or sets the reference view. The reference view is also the parentview to which the current Layout2D view is linked and which is used asreference for alignment. Generally, the reference view is the front view, andthe other views, such as the top, bottom, left, and right views, are linked toit. This reference Layout2D view is used:When moving the current Layout2D view. Its location remains constrainedto the reference view, depending on its type. For example, a left view can movehorizontally and a top view can move vertically.To update the scale of the current Layout2D view according to themodification performed to the one of the reference Layout2Dview.Example:This example retrieves in ReferenceView the view used as reference bythe MyView Layout2D view.Dim ReferenceView As Layout2DViewSet ReferenceView = MyView.RefView
- Return type:
- save_edition() None ¶
Note
- CAA V5 Visual Basic Help (2020-09-25 14:34:21.593357))
- o Sub SaveEdition()Saves the Sketch Edition. Once you have finished working with the Layout2Dview, you must save its edition in order to register modification forUNDO/REDO. Indeed when activating a view, this view is open in edition whilethe previous active view is closed in edition. So calling SaveEdition() beforeexiting a macro without changing active view will allow a correct UNDO/REDObehavior.Example:The following example saves the edition of the Layout2D viewMyView:MyView.SaveEdition
- Return type:
None
- set_view_name(i_view_name_prefix: str, i_view_name_ident: str, i_view_name_suffix: str) None ¶
Note
- CAA V5 Visual Basic Help (2020-09-25 14:34:21.593357))
- o Sub SetViewName(CATBSTR iViewNamePrefix,CATBSTR iViewNameIdent,CATBSTR iViewNameSuffix)Sets the prefix, the ident and the suffix of the name of the Layout2D view.The method returns an error in case of 2D component reference. Do not confusewith the method Name which can be different.Example:This example sets the prefix, the ident, and the suffix of the nameof the MyView Layout2D view respectively to “MyPrefix”,“MyIdent”,and “MySuffix”.MyView.SetViewName (“MyPrefix”, “MyIdent”,“MySuffix”)
- Parameters:
i_view_name_prefix (str) –
i_view_name_ident (str) –
i_view_name_suffix (str) –
- Return type:
None
- size(o_values: tuple) float ¶
Note
- CAA V5 Visual Basic Help (2020-09-25 14:34:21.593357))
- o Sub Size(CATSafeArrayVariant oValues)Returns the bounding box of the Layout2D view.Warning: This method is not implemented.Parameters:oValuesThe values of the view bounding box: Xmin, Xmax, Ymin, YmaxExample:This example gets the bounding box of the ViewToWorkOn Layout2Dview.Dim oXY(4) As DoubleViewToWorkOn.Size oXYXmin = oXY(0)Xmax = oXY(1)Ymin = oXY(2)Ymax = oXY(3)
- Parameters:
o_values (tuple) –
- Return type:
Double
- property tables: DrawingTables¶
Note
- CAA V5 Visual Basic Help (2020-09-25 14:34:21.593357)
- o Property Tables() As DrawingTables (Read Only)Returns the drawing table collection of the drawing view.Example:This example retrieves in TextCollection the collection of texts of theMyView Layout2D view.Dim TableCollection As DrawingTablesSet TableCollection = MyView.Tables
- Return type:
- property texts: DrawingTexts¶
Note
- CAA V5 Visual Basic Help (2020-09-25 14:34:21.593357)
- o Property Texts() As DrawingTexts (Read Only)Returns the drawing text collection of the Layout2D view.Example:This example retrieves in TextCollection the collection of texts of theMyView Layout2D view.Dim TextCollection As DrawingTextsSet TextCollection = MyView.Texts
- Return type:
- property threads: DrawingThreads¶
Note
- CAA V5 Visual Basic Help (2020-09-25 14:34:21.593357)
- o Property Threads() As DrawingThreads (Read Only)Returns the drawing thread collection of the Layout2Dview.Example:This example retrieves in ThreadCollection the collection of threads ofthe MyView Layout2D view.Dim ThreadCollection As DrawingThreadsSet ThreadCollection = MyView.Threads
- Return type:
- un_aligned_with_reference_view() None ¶
Note
- CAA V5 Visual Basic Help (2020-09-25 14:34:21.593357))
- o Sub UnAlignedWithReferenceView()Deactivates the alignment with the reference view. Deactivating thealignment to the reference view removes the constraints that the reference viewimposes to the current Layout2D view. You can then, for example, move andposition it freely.Example:This example deactivates the alignment from the MyView Layout2D view toits reference view.MyView.UnAlignedWithReferenceView()
- Return type:
None
- property view_scale: float¶
Note
- CAA V5 Visual Basic Help (2020-09-25 14:34:21.593357)
- o Property ViewScale() As doubleReturns or sets the scale of the Layout2D view.Example:This example sets the scale of the MyView Layout2D view to0.5.MyView.Scale = 0.5
- Return type:
float
- property visu_2d_mode: int¶
Note
- CAA V5 Visual Basic Help (2020-09-25 14:34:21.593357)
- o Property Visu2DMode() As CatView2DModeVisuSets/Gets the 2D mode for background visualization of theview.See also:CatView2DModeVisuExample:This example shows how to switch on the background 2DmodeView1.Visu2DMode = catView2DModeNoShow
- Returns:
enum cat_view_2d_mode_visu
- Return type:
int
- property visu_background: int¶
Note
- CAA V5 Visual Basic Help (2020-09-25 14:34:21.593357)
- o Property VisuBackground() As CatVisuBackgroundModeSets/Gets the 2D-3D background visu mode of the view ie in the 3D windowsand in the background of each view in every 2D context.See also:CatVisuBackgroundModeExample:This example shows how to set the background toLowIntView1.VisuBackground = catLowIntPick
- Returns:
enum cat_visu_background_mode
- Return type:
int
- property visu_in_3d: int¶
Note
- CAA V5 Visual Basic Help (2020-09-25 14:34:21.593357)
- o Property VisuIn3D() As CatVisuIn3DModeSets/Gets the 3D visualization mode of the view in the 3D Viewer ie in the3D windows and in the background of each view in every 2Dcontext.See also:CatVisuIn3DModeExample:This example shows how to make the View1 Layout2D view visible in3DView1.HideIn3DSize = catShowAll
- Returns:
enum cat_visu_in_3d_mode
- Return type:
int
- property weldings: DrawingWeldings¶
Note
- CAA V5 Visual Basic Help (2020-09-25 14:34:21.593357)
- o Property Weldings() As DrawingWeldings (Read Only)Returns the drawing welding collection of the Layout2Dview.Example:This example retrieves in weldingCollection the collection of weldingsof the MyView Layout2D view.Dim weldingCollection As DrawingWeldingsSet weldingCollection = MyView.Weldings
- Return type:
- property x: float¶
Note
- CAA V5 Visual Basic Help (2020-09-25 14:34:21.593357)
- o Property x() As doubleReturns or sets the x coordinate of the Layout2D view coordinate systemorigin. It is expressed with respect to the sheet coordinate system. Thiscoordinate, like any length, is measured in millimeters.Example:This example retrieves the x coordinate of the coordinate system originof the MyView.X = MyView.x
- Return type:
float
- property y: float¶
Note
- CAA V5 Visual Basic Help (2020-09-25 14:34:21.593357)
- o Property y() As doubleReturns or sets the y coordinate of the Layout2D view coordinate systemorigin. It is expressed with respect to the sheet coordinate system. Thiscoordinate, like any length, is measured in millimeters.Example:This example sets the y coordinate of the coordinate system origin ofthe MyView to 5 inches. You need first to convert the 5 inches intomillimeters.NewYCoordinate = 5*25.4MyView.y = NewYCoordinate
- Return type:
float