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.IUnknown
System.IDispatch
System.CATBaseUnknown
System.CATBaseDispatch
System.Collection
DrawingPictures

A collection of all the drawing pictures currently managed by a drawing view of
drawing 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 DrawingPicture

Inserts a drawing picture in the drawing view and adds it to the
DrawingPictures collection.

Parameters:

iDrawingPicturePath
The path of the picture file (ex : “C:/tmp/ball.bmp”) .
iPositionX,iPositionY
The drawing picture x and y coordinates, expressed in millimeters,
with respect to the drawing view coordinate system


Returns:
The inserted drawing picture

Example:
The following example inserts a drawing picture from a given picture file
path The MyView is the active view in the active drawing
sheet

Dim MySheet As DrawingSheet
Set MySheet = CATIA.ActiveDocument.Sheets.ActiveSheet
Dim MyView As DrawingView
Set MyView = MySheet.Views.ActiveView
Dim MyDrawingPicture1 As DrawingPicture
Set 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:

DrawingPicture

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 DrawingPicture

Returns a drawing picture using its index or its name from the
DrawingPictures collection.

Parameters:

iIndex
The index or the name of the drawing picture to retrieve from the
collection of drawing pictures. As a numerics, this index is the rank of the
drawing picture in the collection. The index of the first drawing picture in
the collection is 1, and the index of the last drawing picture is Count. As a
string, it is the name you assigned to the drawing picture using the


AnyObject.Name property
Returns:
The retrieved drawing picture

Example:
This example retrieves in ThisDrawingPicture the second drawing picture,
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 MyView As DrawingView
Set MyView = MySheet.Views.ActiveView
Dim ThisDrawingPicture As DrawingPicture
Set ThisDrawingPicture = MyView.Pictures.Item(2)
Parameters:

i_index (cat_variant) –

Return type:

DrawingPicture

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 DrawingPictures
collection.

Parameters:

iIndex
The index of the drawing picture to remove from the collection of
drawing pictures. As a numerics, this index is the rank of the drawing picture
in the collection. The index of the first drawing picture in the collection is
1, and the index of the last drawing picture is Count. As a string, it is the
name you assigned to the drawing picture using the


AnyObject.Name property

Example:
The following example removes the third drawing picture in the drawing
pictures collection of the active view of the active document, supposed to be a
drawing document.

Dim MyView As DrawingView
Set MyView = MySheet.Views.ActiveView
MyView.Pictures.Remove(3)
Parameters:

i_index (cat_variant) –

Return type:

None