pycatia.drafting_interfaces.drawing_pictures¶
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_pictures.DrawingPictures(com_object)¶
Note
CAA V5 Visual Basic Help (2020-06-11 12:40:47.360445)
System.IUnknownSystem.IDispatchSystem.CATBaseUnknownSystem.CATBaseDispatchSystem.CollectionDrawingPicturesA collection of all the drawing pictures currently managed by a drawing view ofdrawing sheet in a drawing document.- add(i_drawing_picture_path: Path, i_position_x: float, i_position_y: float) DrawingPicture ¶
When passing a path of the image file to this function it’s recommended to use the absolute path or the method may not work. Otherwise, Path library will try and determine the absolute path if it can.
Note
- CAA V5 Visual Basic Help (2020-06-11 12:40:47.360445))
- o Func Add(CATBSTR iDrawingPicturePath,double iPositionX,double iPositionY) As DrawingPictureInserts a drawing picture in the drawing view and adds it to theDrawingPictures collection.Parameters:iDrawingPicturePathThe path of the picture file (ex : “C:/tmp/ball.bmp”) .iPositionX,iPositionYThe drawing picture x and y coordinates, expressed in millimeters,with respect to the drawing view coordinate systemReturns:The inserted drawing pictureExample:The following example inserts a drawing picture from a given picture filepath The MyView is the active view in the active drawingsheetDim MySheet As DrawingSheetSet MySheet = CATIA.ActiveDocument.Sheets.ActiveSheetDim MyView As DrawingViewSet MyView = MySheet.Views.ActiveViewDim MyDrawingPicture1 As DrawingPictureSet MyDrawingPicture1 = MyView.Pictures.Add(“C:/tmp/ball.bmp”, 100., 50.)
- Parameters:
i_drawing_picture_path (Path) –
i_position_x (float) –
i_position_y (float) –
- Return type:
- item(i_index: cat_variant) DrawingPicture ¶
Note
- CAA V5 Visual Basic Help (2020-06-11 12:40:47.360445))
- o Func Item(CATVariant iIndex) As DrawingPictureReturns a drawing picture using its index or its name from theDrawingPictures collection.Parameters:iIndexThe index or the name of the drawing picture to retrieve from thecollection of drawing pictures. As a numerics, this index is the rank of thedrawing picture in the collection. The index of the first drawing picture inthe collection is 1, and the index of the last drawing picture is Count. As astring, it is the name you assigned to the drawing picture using theAnyObject.Name propertyReturns:The retrieved drawing pictureExample:This example retrieves in ThisDrawingPicture the second drawing picture,MyView in the drawing view collection of the active sheet in the activedocument, supposed to be a drawing document.Dim MySheet As DrawingSheetSet MySheet = CATIA.ActiveDocument.Sheets.ActiveSheetDim MyView As DrawingViewSet MyView = MySheet.Views.ActiveViewDim ThisDrawingPicture As DrawingPictureSet ThisDrawingPicture = MyView.Pictures.Item(2)
- 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 picture from the DrawingPicturescollection.Parameters:iIndexThe index of the drawing picture to remove from the collection ofdrawing pictures. As a numerics, this index is the rank of the drawing picturein the collection. The index of the first drawing picture in the collection is1, and the index of the last drawing picture is Count. As a string, it is thename you assigned to the drawing picture using theAnyObject.Name propertyExample:The following example removes the third drawing picture in the drawingpictures collection of the active view of the active document, supposed to be adrawing document.Dim MyView As DrawingViewSet MyView = MySheet.Views.ActiveViewMyView.Pictures.Remove(3)
- Parameters:
i_index (cat_variant) –
- Return type:
None