pycatia.drafting_interfaces.drawing_table¶
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_table.DrawingTable(com_object)¶
Note
CAA V5 Visual Basic Help (2020-06-11 12:40:47.360445)
System.IUnknownSystem.IDispatchSystem.CATBaseUnknownSystem.CATBaseDispatchSystem.AnyObjectDrawingTableRepresents a drawing table in a drawing view.- add_column(i_col: int) None ¶
Note
- CAA V5 Visual Basic Help (2020-06-11 12:40:47.360445))
- o Sub AddColumn(long iCol)Adds a column before the indicated column.Parameters:iColThe column before which the new column will beinsertedExample:This example adds a column after the last one of the drawingtable MyTable.iCol = 0MyTable.AddColumn iCol
- Parameters:
i_col (int) –
- Return type:
None
- add_row(i_row: int) None ¶
Note
- CAA V5 Visual Basic Help (2020-06-11 12:40:47.360445))
- o Sub AddRow(long iRow)Adds a row before the indicated row.Parameters:iRowThe row before which the new row will be insertedExample:This example adds a row beetween the first row and the secondrow of the drawing table MyTable.iRow = 2MyTable.AddRow iRow
- Parameters:
i_row (int) –
- Return type:
None
- property anchor_point: int¶
Note
- CAA V5 Visual Basic Help (2020-06-11 12:40:47.360445)
- o Property AnchorPoint() As CatTablePositionReturns or sets the anchor point of a drawing table.Parameters:iModeThe invert mode to applyExample:This example sets the anchor point of the drawing table MyTableto bottom left.MyTable.AnchorPoint = CatTableBottomLeft
- Returns:
enum cat_table_position
- Return type:
int
- property angle: float¶
Note
- CAA V5 Visual Basic Help (2020-06-11 12:40:47.360445)
- o Property Angle() As doubleReturns or sets the angle orientation of a drawing table.Example:This example sets the orientation of the table MyTable tovertical.PI = 3.1415926535X = MyTable.Angle = PI/2
- Return type:
float
- property compute_mode: int¶
Note
- CAA V5 Visual Basic Help (2020-06-11 12:40:47.360445)
- o Property ComputeMode() As CatTableComputeModeReturns or sets the compute mode of a drawing table. If the compute mode isset to OFF, no display of the modifications applied to a table will becomputed. This allows to save much time when executing a macro. To displayedthe table, set the compute mode back to ON.Example:This example sets the compute mode of the drawing table MyTable toOFF.MyTable.ComputeMode = CatTableOFF
- Returns:
enum cat_table_compute_mode
- Return type:
int
- get_cell_alignment(i_row: int, i_col: int) int ¶
Note
- CAA V5 Visual Basic Help (2020-06-11 12:40:47.360445))
- o Func GetCellAlignment(long iRow,long iCol) As CatTablePositionRetrieves the alignment of the pointed cell of a drawingtable.Parameters:iRowThe cell rowiColThe cell columnoAlignThe alignment type of the cellExample:This example retrieves the alignment of the cell (1,3) of thetable MyTable.iRow = 1iCol = 3oAlign = MyTable.GetCellAlignment(iRow, iCol)
- Parameters:
i_row (int) –
i_col (int) –
- Returns:
enum cat_table_position
- Return type:
int
- get_cell_border_type(i_row: int, i_col: int) int ¶
Note
- CAA V5 Visual Basic Help (2020-06-11 12:40:47.360445))
- o Func GetCellBorderType(long iRow,long iCol) As CatTableBorderTypeRetrieves the drawing text contained in the cell of a drawingtable.Parameters:iRowThe cell rowiColThe cell columnoTypeThe type of the cell borderExample:This example retrieves the border type of the cell (1, 3) ofthe drawing table MyTable.iRow = 1iCol = 3oType = MyTable.GetCellBorderType(iRow, iCol)!!!! WARNING oType is not defined as the enum does but as itis documented in the SetCellBorderType methodif oType == 15 it means border is set to left, top, right andbottom.if oType == 8 it means border is set to bottom.
- Parameters:
i_row (int) –
i_col (int) –
- Returns:
enum cat_table_border_type
- Return type:
int
- get_cell_name(i_row: int, i_col: int) str ¶
Note
- CAA V5 Visual Basic Help (2020-06-11 12:40:47.360445))
- o Func GetCellName(long iRow,long iCol) As CATBSTRReturns the name of a table cell.Parameters:iRowThe cell rowiColThe cell columnoNameThe cell nameExample:This example returns the name of the cell (1,2) of the tableMyTable.iRow = 1iCol = 2oName = MyTable.GetCellName(iRow, iCol)
- Parameters:
i_row (int) –
i_col (int) –
- Return type:
str
- get_cell_object(i_row: int, i_col: int) DrawingText ¶
Note
- CAA V5 Visual Basic Help (2020-06-11 12:40:47.360445))
- o Func GetCellObject(long iRow,long iCol) As DrawingTextRetrieves the object contained in the cell of a drawingtable.Parameters:iRowThe cell rowiColThe cell columnoTextThe object contained in the cell : this object only supports font properties, color, linespacing, Super/Sub script. Do not use position and/or orientation properties on thisobject, it is useless.Example:This example retrieves the drawing text MyText of the cell(1,3) of the table MyTable.iRow = 1iCol = 3Set MyText = MyTable.GetCellObject(iRow, iCol)
- Parameters:
i_row (int) –
i_col (int) –
- Return type:
- get_cell_string(i_row: int, i_col: int) str ¶
Note
- CAA V5 Visual Basic Help (2020-06-11 12:40:47.360445))
- o Func GetCellString(long iRow,long iCol) As CATBSTRReturns the string contained in the cell of a drawingtable.Parameters:iRowThe cell rowiColThe cell columnoStringThe string contained in the cellExample:This example returns the string contained in the cell (1,4) ofthe table MyTable.iRow = 1iCol = 4oString = MyTable.GetCellString(iRow, iCol)
- Parameters:
i_row (int) –
i_col (int) –
- Returns:
str
- get_cells_merge(o_list_of_merge_cells: tuple) None ¶
Note
- CAA V5 Visual Basic Help (2020-06-11 12:40:47.360445))
- o Sub GetCellsMerge(CATSafeArrayVariant oListOfMergeCells)Returns the merge cells.Parameters:oListOfMergeCells@param oListOfMergeCells List of merge cells.Example:This example returns the merge cells of the drawing tableMyTable.nbrow = MyTable.NumberOfRowsnbcol = MyTable.NumberOfColumnssizetab = nbrow*nbcolReDim infoMerge (sizetab-1)MyTable.GetCellsMerge(oListOfmergeCells)
- Parameters:
o_list_of_merge_cells (tuple) –
- Return type:
None
- get_column_size(i_col: int) float ¶
Note
- CAA V5 Visual Basic Help (2020-06-11 12:40:47.360445))
- o Func GetColumnSize(long iCol) As doubleReturns the width of a column of a drawing table.Parameters:iColThe cell columnoColSizeThe cell width in mm. It corresponds to the size of the widest cellof the column or at least the size set withCATIADrawingTable::SetColumnSize.Example:This example returns the width of the column (1) of the drawingtable MyTable.iCol = 1oColSize = MyTable.GetColumnSize(iCol)
- Parameters:
i_col (int) –
- Return type:
float
- get_merge_infos(i_row: int, i_col: int, o_first_row: int, o_first_col: int, o_nb_row: int, o_nb_col: int) None ¶
Note
- CAA V5 Visual Basic Help (2020-06-11 12:40:47.360445))
- o Sub GetMergeInfos(long iRow,long iCol,long oFirstRow,long oFirstCol,long oNbRow,long oNbCol)Returns informations about a group of merge cells from acell.Parameters:iRow@param iCol cell of mergeiFirstRowRow of the first cell of the group Column of the first cell of thegroupiNbRowMergeNumber of rows of the groupiNbColMergeNumber of columns of the groupExample:This example returns informations of a group of merge cellsfrom cell (2, 3) of the drawing table MyTable.MyTable.GetMergeInfos 2, 3, oFirstRow, oFirstCol, oNbRow,oNbCol
- Parameters:
i_row (int) –
i_col (int) –
o_first_row (int) –
o_first_col (int) –
o_nb_row (int) –
o_nb_col (int) –
- Return type:
None
- get_row_size(i_row: int) float ¶
Note
- CAA V5 Visual Basic Help (2020-06-11 12:40:47.360445))
- o Func GetRowSize(long iRow) As doubleReturns the height of a row of a drawing table.Parameters:iRowThe cell rowoRowSizeThe cell height in mm. It corresponds to the size of the highestcell of the row or at least the size set withCATIADrawingTable::SetRowsize.Example:This example returns the height of the row (1) of the drawingtable MyTable.iRow = 1oRowSize = MyTable.GetRowSize(iRow)
- Parameters:
i_row (int) –
- Return type:
float
- invert_mode(i_mode: int) None ¶
Note
- CAA V5 Visual Basic Help (2020-06-11 12:40:47.360445))
- o Sub InvertMode(CatTableInvertMode iMode)Sets a mode of table inversion.Example:This example swaps the columns of the drawing tableMyTable.MyTable.InvertMode CatInvertColumn
- Parameters:
i_mode (int) – enum cat_table_invert_mode
- Return type:
None
- property leaders: DrawingLeaders¶
Note
- CAA V5 Visual Basic Help (2020-06-11 12:40:47.360445)
- o Property Leaders() As DrawingLeaders (Read Only)Returns the drawing leader collection of the drawingtable.Example:This example retrieves in LeaderCollection the collection of leaders ofthe MyTable drawing table.Dim LeaderCollection As DrawingLeadersSet LeaderCollection = MyTable.Leaders
- Return type:
- merge_cells(i_first_row, i_first_col, i_nb_row_merge, i_nb_col_merge)¶
Note
- CAA V5 Visual Basic Help (2020-06-11 12:40:47.360445))
- o Sub MergeCells(long iFirstRow,long iFirstCol,long iNbRowMerge,long iNbColMerge)Merges a group of cells.Parameters:iFirstRow@param iFirstCol First cell of mergeiNbRowMergeNumber of rows to mergeiNbColMergeNumber of columns to mergeExample:This example merges cells from cell (2, 3) to cell (4, 5) ofthe drawing table MyTable.MyTable.MergeCells 2, 3, 3, 3
- Parameters:
i_first_row (int) –
i_first_col (int) –
i_nb_row_merge (int) –
i_nb_col_merge (int) –
- Return type:
None
- move(i_delta_x: float, i_delta_y: float) None ¶
Note
- CAA V5 Visual Basic Help (2020-06-11 12:40:47.360445))
- o Sub Move(double iDeltaX,double iDeltaY)Moves the table relatively to its original position.Parameters:iDeltaXThe X deviationideltaYThe Y deviationExample:This example moves the table MyTable to 20mm inX.DeltaX = 20.0DeltaY = 0.0MyTable.Move DeltaX, DeltaY
- Parameters:
i_delta_x (float) –
i_delta_y (float) –
- Return type:
None
- property number_of_columns: int¶
Note
- CAA V5 Visual Basic Help (2020-06-11 12:40:47.360445)
- o Property NumberOfColumns() As long (Read Only)Returns the number of columns of a drawing table.Example:This example returns the number of columns of the drawing tableMyTable.oNbCol = MyTable.NumberOfColumns
- Return type:
int
- property number_of_rows: int¶
Note
- CAA V5 Visual Basic Help (2020-06-11 12:40:47.360445)
- o Property NumberOfRows() As long (Read Only)Returns the number of rows of a drawing table.Example:This example returns the number of rows of the drawing tableMyTable.oNbRow = MyTable.NumberOfRows
- Return type:
int
- remove_column(i_col: int) None ¶
Note
- CAA V5 Visual Basic Help (2020-06-11 12:40:47.360445))
- o Sub RemoveColumn(long iCol)Removes the indicated column.Parameters:iColThe column to removeExample:This example removes the first column of the drawing tableMyTable.iCol = 1MyTable.RemoveColumn iCol
- Parameters:
i_col (int) –
- Return type:
None
- remove_row(i_row)¶
Note
- CAA V5 Visual Basic Help (2020-06-11 12:40:47.360445))
- o Sub RemoveRow(long iRow)Removes the indicated row.Parameters:iRowThe row to removeExample:This example removes the third row of the drawing tableMyTable.iRow = 3MyTable.RemoveRow iRow
- Parameters:
i_row (int) –
- Return type:
None
- rotate(i_delta_angle: float) None ¶
Note
- CAA V5 Visual Basic Help (2020-06-11 12:40:47.360445))
- o Sub Rotate(double iDeltaAngle)Rotates the table relatively to its original position.Parameters:iDeltaAngleThe angle of rotation from the current positionExample:This example rotates the table MyTable to 45degrees.PI = 3.1415926535MyTable.Rotate PI/4
- Parameters:
i_delta_angle (float) –
- Return type:
None
- set_cell_alignment(i_row: int, i_col: int, i_align: int) None ¶
Note
- CAA V5 Visual Basic Help (2020-06-11 12:40:47.360445))
- o Sub SetCellAlignment(long iRow,long iCol,CatTablePosition iAlign)Sets the pointed cell alignment of a drawing table.Parameters:iRowThe cell rowiColThe cell columniAlignThe type of alignment to be appliedExample:This example sets the cell (3,2) alignment of the table MyTableto bottom left.iRow = 3iCol = 2MyTable.SetCellAlignment iRow, iCol,CatTableBottomLeft
- Parameters:
i_row (int) –
i_col (int) –
i_align (int) – enum cat_table_position
- Return type:
None
- set_cell_border_type(i_row: int, i_col: int, i_type: int) None ¶
Note
- CAA V5 Visual Basic Help (2020-06-11 12:40:47.360445))
- o Sub SetCellBorderType(long iRow,long iCol,long iType)Sets the pointed cell border type of a drawing table.Parameters:iRowThe cell rowiColThe cell columniTypeThe type of border to be appliedExample:This example sets the cell (3,2) border type of the tableMyTable to right and left. (1+4)iRow = 3iCol = 2MyTable.SetCellBorderType iRow, iCol, 5Example:This example sets the cell (1,1) border type of the table MyTable to all border outline (left, top, right and bottom). (1+2+4+8 = 15)iRow = 3iCol = 2MyTable.SetCellBorderType iRow, iCol, 15
- Parameters:
i_row (int) –
i_col (int) –
i_type (int) –
- Return type:
None
- set_cell_name(i_row: int, i_col: int, i_name: str) None ¶
Note
- CAA V5 Visual Basic Help (2020-06-11 12:40:47.360445))
- o Sub SetCellName(long iRow,long iCol,CATBSTR iName)Sets the name of a table cell.Parameters:iRowThe cell rowiColThe cell columniNameThe cell nameExample:This example sets the name of the cell (1,2) of the tableMyTable to “Cell 2”.iRow = 1iCol = 2iName = “Cell 2”MyTable.SetCellName iRow, iCol, iName
- Parameters:
i_row (int) –
i_col (int) –
i_name (str) –
- Return type:
None
- set_cell_object(i_row: int, i_col: int, i_text: DrawingText) None ¶
Note
- CAA V5 Visual Basic Help (2020-06-11 12:40:47.360445))
- o Sub SetCellObject(long iRow,long iCol,DrawingText iText)Sets an object in a cell of a drawing table.Parameters:iRowThe cell rowiColThe cell columniTextThe Drawing Text to set in the cellExample:This example puts the drawing text iText in the cell (1,3) ofthe table MyTable.iRow = 1iCol = 3MyTable.SetCellObject iRow, iCol, iText
- Parameters:
i_row (int) –
i_col (int) –
i_text (DrawingText) –
- Return type:
None
- set_cell_string(i_row: int, i_col: int, i_string: str) None ¶
Note
- CAA V5 Visual Basic Help (2020-06-11 12:40:47.360445))
- o Sub SetCellString(long iRow,long iCol,CATBSTR iString)Fills in a table cell with a string.Parameters:iRowThe cell rowiColThe cell columniStringThe Text to be setExample:This example fills in the cell (3,2) of the table MyTable with“Title”.iRow = 3iCol = 2iString = “Title”MyTable.SetCellString iRow, iCol, iString
- Parameters:
i_row (int) –
i_col (int) –
i_string (str) –
- Return type:
None
- set_column_size(i_col: int, i_col_size: float) None ¶
Note
- CAA V5 Visual Basic Help (2020-06-11 12:40:47.360445))
- o Sub SetColumnSize(long iCol,double iColSize)Sets the width of a column of a drawing table.Parameters:iColThe cell columniColSizeThe cell width in mm. If 0, the width is automatic (corresponds tothe size of the widest cell of the column).Example:This example sets the width of the column (1) of the drawingtable MyTable to 20.iCol = 1iColSize = 20MyTable.SetColumnSize iCol, iColSize
- Parameters:
i_col (int) –
i_col_size (float) –
- Return type:
None
- set_row_size(i_row: int, i_row_size: float) None ¶
Note
- CAA V5 Visual Basic Help (2020-06-11 12:40:47.360445))
- o Sub SetRowSize(long iRow,double iRowSize)Sets the height of a row of a drawing table.Parameters:iRowThe cell rowiRowSizeThe cell height in mm. If 0, the height is automatic (correspondsto the size of the highest cell of the row).Example:This example sets the height of the row (1) of the drawingtable MyTable to 20.iRow = 1iRowSize = 20MyTable.SetRowSize iRow, iRowSize
- Parameters:
i_row (int) –
i_row_size (float) –
- Return type:
None
- un_merge_cells(i_row: int, i_col: int) None ¶
Note
- CAA V5 Visual Basic Help (2020-06-11 12:40:47.360445))
- o Sub UnMergeCells(long iRow,long iCol)Unmerges a group of cells.Parameters:iRow@param iCol A cell of a mergeExample:This example unmerges a group of cells of the drawing tableMyTable from the cell (3, 5).MyTable.UnMergeCells 3, 5
- Parameters:
i_row (int) –
i_col (int) –
- Return type:
None
- property x: float¶
Note
- CAA V5 Visual Basic Help (2020-06-11 12:40:47.360445)
- o Property x() As doubleReturns or sets the x coordinate of the table. It is expressed with respectto the current view coordinate system. This coordinate, like any length, ismeasured in mm.Example:This example retrieves the x coordinate of the table MyTable drawingtable.X = MyTable.x
- Return type:
float
- property y: float¶
Note
- CAA V5 Visual Basic Help (2020-06-11 12:40:47.360445)
- o Property y() As doubleReturns or sets the y coordinate of the table. It is expressed with respectto the view coordinate system. This coordinate, like any length, is measured inmm.Example:This example sets the y coordinate of the table MyTable drawing tableto 5 inches. You need first to convert the 5 inches intomm.NewYCoordinate = 100MyTable.y = NewYCoordinate
- Return type:
float