pycatia.drafting_interfaces.drawing_dimensions¶
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_dimensions.DrawingDimensions(com_object)¶
Note
CAA V5 Visual Basic Help (2020-06-11 12:40:47.360445)
System.IUnknownSystem.IDispatchSystem.CATBaseUnknownSystem.CATBaseDispatchSystem.CollectionDrawingDimensionsA collection of all the drawing dimensions currently managed by a drawing viewof drawing sheet in a drawing document.- add(i_type_dim: int, i_geom_elem: tuple, i_pt_coord_elem: tuple, i_line_rep: int) DrawingDimension ¶
Note
- CAA V5 Visual Basic Help (2020-06-11 12:40:47.360445))
- o Func Add(CatDimType iTypeDim,CATSafeArrayVariant iGeomElem,CATSafeArrayVariant iPtCoordElem,CatDimLineRep iLineRep) As DrawingDimensionCreates a drawing dimension and adds it to the DrawingDimensionscollection.Parameters:iTypeDimDimension typeiGeomElemParent geometrical element(s) of dimensioniPtCoordElemArray of pointers on the selection points of each element ofiGeomElemiLineRepBasic representation modeReturns:The created drawing dimensionExample:The following example creates a drawing angle dimension between two linesand a partial curvilinear length dimension on an ellipse and retrieved inMyDimension1 and MyDimension2 in the drawing view collection of the MyViewdrawing view. This view belongs to the drawing view collection of the drawingsheetDim MyView As DrawingViewSet MyView = MySheet.Views.ActiveViewDim Fact2D As Factory2DSet Fact2D = MyView.Factory2DDim Line1 As Line2DDim Line2 As Line2DSet Line1 = Fact2D.CreateLine(50, 10, 150, 10)Set Line2 = Fact2D.CreateLine(50, 10, 120, 100)Dim Ellipse1 As Ellipse2DSet Ellipse1 = Fact2D.CreateEllipse(-40, 100, 120, 180,120,90,0, 3)Dim Point1 As Point2DDim Point2 As Point2DSet Point1 = Fact2D.CreatePoint(-10,190)Set Point2 = Fact2D.CreatePoint(-120,90)Dim iType As catDimTypeiType = catDimAngleDim myElements1(1)myElements1(1) = Array(Line1,Line2)Dim selpoints(3)selpoints(3) = Array(150, 10, 120, 100)Dim MyDimension1 As DrawingDimensionSet MyDimension1 = MyView.Dimensions.Add(iType, myElements1(1), selpoints(3),catDimAuto)iType = catDimLengthCurvilinearDim myElements2(2)myElements2(2) = Array(Point1,Point2,Ellipse1)selpoints(3) = Array(0, 0, 0, 0)Dim MyDimension2 As DrawingDimensionSet MyDimension2 = MyView.Dimensions.Add(iType, myElements2(1), selpoints(3),catDimOffset)
- Parameters:
i_type_dim (int) – enum cat_dim_type
i_geom_elem (tuple) –
i_pt_coord_elem (tuple) –
i_line_rep (int) –
- Return type:
- add2(i_type_dim: int, i_geom_elem: tuple, i_pt_coord_elem: tuple, i_ldc_ref_elem: cat_variant, i_ldc_ref_angle: int) DrawingDimension ¶
Note
- CAA V5 Visual Basic Help (2020-06-11 12:40:47.360445))
- o Func Add2(CatDimType iTypeDim,CATSafeArrayVariant iGeomElem,CATSafeArrayVariant iPtCoordElem,CATVariant iLDCRefElem,long iLDCRefAngle) As DrawingDimensionCreates a drawing dimension along a direction and adds it to theDrawingDimensions collection.Parameters:iTypeDimDimension type (available types : catDimDistance, catDimLength, catDimRadiusTangent andcatDimDiameterTangent)iGeomElemParent geometrical element(s) of dimensioniPtCoordElemArray of pointers on the selection points of each element ofiGeomElemiLDCRefElemReference geometrical element for the direction of the dimensionline .iLDCRefElem can be null: in this case, the view is the reference elementiLDCRefAngleAngle between the reference element and the direction of thedimension lineReturns:The created drawing dimension (The property CATDimLineRep of thedimension line of the created dimension is set to catDimUserDefined)Example:The following example creates a drawing distance dimension between twopoints along the direction of a line and retrieved in MyDimension in thedrawing view collection of the MyView drawing view. This view belongs to thedrawing view collection of the drawing sheetDim MyView As DrawingViewSet MyView = MySheet.Views.ActiveViewDim Fact2D As Factory2DSet Fact2D = MyView.Factory2DDim Point1 As Point2DDim Point2 As Point2DSet Point1 = Fact2D.CreatePoint(40, 230)Set Point2 = Fact2D.CreatePoint(80, 210)Dim Line1 As Line2DSet Line1 = Fact2D.CreateLine(50, 10, 150, 10)Dim iType As catDimTypeiType = catDimDistanceDim myElements(1)myElements(1) = Array(Point1,Point2)Dim selpoints(3)selpoints(3) = Array(0, 0, 0, 0)Dim MyDimension As DrawingDimensionSet MyDimension = MyView.Dimensions.Add2(iType, myElements(1), selpoints(3), Line1, 0)
- Parameters:
i_type_dim (int) – enum cat_dim_type
i_geom_elem (tuple) –
i_pt_coord_elem (tuple) –
i_ldc_ref_elem (cat_variant) –
i_ldc_ref_angle (int) –
- Return type:
- item(i_index: cat_variant) DrawingDimension ¶
Note
- CAA V5 Visual Basic Help (2020-06-11 12:40:47.360445))
- o Func Item(CATVariant iIndex) As DrawingDimensionReturns a drawing dimension using its index or its name from theDrawingDimensions collection.Parameters:iIndexThe index or the name of the drawing dimension to retrieve from thecollection of drawing dimensions. As a numerics, this index is the rank of thedrawing dimension in the collection. The index of the first drawing dimensionin the collection is 1, and the index of the last drawing dimension is Count.As a string, it is the name you assigned to the drawing dimension using theAnyObject.Name property or when creating it using the Add method.Returns:The retrieved drawing dimensionExample:This example retrieves in ThisDrawingDimension the second drawingdimension,and in ThatDrawingDimension the drawing dimensionnamedMyDimension in the drawing dimension collection of the activeview.Dim MyView As DrawingViewSet MyView = MySheet.Views.ActiveViewDim ThisDrawingDimension As DrawingDimensionSet ThisDrawingDimension = MyView.Dimensions.Item(2)Dim ThatDrawingDimension As DrawingDimensionSet ThatDrawingDimension = MyView.Dimensions.Item(“MyDimension”)
- 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 dimension from the DrawingDimensionscollection.Parameters:iIndexThe index of the drawing dimension to remove from the collection ofdrawing dimensions. As a numerics, this index is the rank of the drawingdimension in the collection. The index of the first drawing dimension in thecollection is 1, and the index of the last drawing dimension is Count.Example:The following example removes the third drawing dimension in thedrawing dimension collection of the active view of the active document,supposed to be a drawing document.Dim MyView As DrawingViewSet MyView = MySheet.Views.ActiveViewMyView.Dimensions.Remove(3)
- Parameters:
i_index (cat_variant) –
- Return type:
None