Indexes   

DrawingTable (Object)

Represents a drawing table in a drawing view.

Property Index

AnchorPoint
Returns or sets the anchor point of a drawing table.
Angle
Returns or sets the angle orientation of a drawing table.
ComputeMode
Returns or sets the compute mode of a drawing table.
Leaders
Returns the drawing leader collection of the drawing table.
NumberOfColumns
Returns the number of columns of a drawing table.
NumberOfRows
Returns the number of rows of a drawing table.
x
Returns or sets the x coordinate of the table.
y
Returns or sets the y coordinate of the table.

Method Index

AddColumn
Adds a column before the indicated column.
AddRow
Adds a row before the indicated row.
GetCellAlignment
Retrieves the alignment of the pointed cell of a drawing table.
GetCellBorderType
Retrieves the drawing text contained in the cell of a drawing table.
GetCellName
Returns the name of a table cell.
GetCellObject
Retrieves the object contained in the cell of a drawing table.
GetCellString
Returns the string contained in the cell of a drawing table.
GetCellsMerge
Returns the merge cells.
GetColumnSize
Returns the width of a column of a drawing table.
GetMergeInfos
Returns informations about a group of merge cells from a cell.
GetRowSize
Returns the height of a row of a drawing table.
InvertMode
Sets a mode of table inversion.
MergeCells
Merges a group of cells.
Move
Moves the table relatively to its original position.
RemoveColumn
Removes the indicated column.
RemoveRow
Removes the indicated row.
Rotate
Rotates the table relatively to its original position.
SetCellAlignment
Sets the pointed cell alignment of a drawing table.
SetCellBorderType
Sets the pointed cell border type of a drawing table.
SetCellName
Sets the name of a table cell.
SetCellObject
Sets an object in a cell of a drawing table.
SetCellString
Fills in a table cell with a string.
SetColumnSize
Sets the width of a column of a drawing table.
SetRowSize
Sets the height of a row of a drawing table.
UnMergeCells
Unmerges a group of cells.

Properties


o Property AnchorPoint() As
Returns or sets the anchor point of a drawing table.
Parameters:
iMode
The invert mode to apply
Example:
This example sets the anchor point of the drawing table MyTable to bottom left.
 MyTable.AnchorPoint = CatTableBottomLeft
 
o Property Angle() As
Returns or sets the angle orientation of a drawing table.
Example:
This example sets the orientation of the table MyTable to vertical.
 PI = 3.1415926535
 X = MyTable.Angle = PI/2
 
o Property ComputeMode() As
Returns or sets the compute mode of a drawing table. If the compute mode is set to OFF, no display of the modifications applied to a table will be computed. This allows to save much time when executing a macro. To displayed the table, set the compute mode back to ON.
Example:
This example sets the compute mode of the drawing table MyTable to OFF.
 MyTable.ComputeMode = CatTableOFF
 
o Property Leaders() As (Read Only)
Returns the drawing leader collection of the drawing table.
Example:
This example retrieves in LeaderCollection the collection of leaders of the MyTable drawing table.
 Dim LeaderCollection As DrawingLeaders
 Set LeaderCollection = MyTable.Leaders
 
o Property NumberOfColumns() As (Read Only)
Returns the number of columns of a drawing table.
Example:
This example returns the number of columns of the drawing table MyTable.
 oNbCol = MyTable.NumberOfColumns
 
o Property NumberOfRows() As (Read Only)
Returns the number of rows of a drawing table.
Example:
This example returns the number of rows of the drawing table MyTable.
 oNbRow = MyTable.NumberOfRows
 
o Property x() As
Returns or sets the x coordinate of the table. It is expressed with respect to the current view coordinate system. This coordinate, like any length, is measured in mm.
Example:
This example retrieves the x coordinate of the table MyTable drawing table.
 X = MyTable.x
 
o Property y() As
Returns or sets the y coordinate of the table. It is expressed with respect to the view coordinate system. This coordinate, like any length, is measured in mm.
Example:
This example sets the y coordinate of the table MyTable drawing table to 5 inches. You need first to convert the 5 inches into mm.
 NewYCoordinate = 100
 MyTable.y =  NewYCoordinate
 

Methods


o Sub AddColumn( iCol)
Adds a column before the indicated column.
Parameters:
iCol
The column before which the new column will be inserted
Example:
This example adds a column after the last one of the drawing table MyTable.
 iCol = 0
 MyTable.AddColumn iCol
 
o Sub AddRow( iRow)
Adds a row before the indicated row.
Parameters:
iRow
The row before which the new row will be inserted
Example:
This example adds a row beetween the first row and the second row of the drawing table MyTable.
 iRow = 2
 MyTable.AddRow iRow
 
o Func GetCellAlignment( iRow,
iCol) As
Retrieves the alignment of the pointed cell of a drawing table.
Parameters:
iRow
The cell row
iCol
The cell column
oAlign
The alignment type of the cell
Example:
This example retrieves the alignment of the cell (1,3) of the table MyTable.
 iRow = 1
 iCol = 3
 oAlign = MyTable.GetCellAlignment(iRow, iCol)
 
o Func GetCellBorderType( iRow,
iCol) As
Retrieves the drawing text contained in the cell of a drawing table.
Parameters:
iRow
The cell row
iCol
The cell column
oType
The type of the cell border
Example:
This example retrieves the border type of the cell (1, 3) of the drawing table MyTable.
 iRow = 1
 iCol = 3
 oType = MyTable.GetCellBorderType(iRow, iCol)
 
o Func GetCellName( iRow,
iCol) As
Returns the name of a table cell.
Parameters:
iRow
The cell row
iCol
The cell column
oName
The cell name
Example:
This example returns the name of the cell (1,2) of the table MyTable.
 iRow = 1
 iCol = 2
 oName = MyTable.GetCellName(iRow, iCol)
 
o Func GetCellObject( iRow,
iCol) As
Retrieves the object contained in the cell of a drawing table.
Parameters:
iRow
The cell row
iCol
The cell column
oText
The object contained in the cell : this object only supports font properties, color, line spacing, Super/Sub script. Do not use position and/or orientation properties on this object, it is useless.
Example:
This example retrieves the drawing text MyText of the cell (1,3) of the table MyTable.
 iRow = 1
 iCol = 3
 Set MyText = MyTable.GetCellObject(iRow, iCol)
 
o Func GetCellString( iRow,
iCol) As
Returns the string contained in the cell of a drawing table.
Parameters:
iRow
The cell row
iCol
The cell column
oString
The string contained in the cell
Example:
This example returns the string contained in the cell (1,4) of the table MyTable.
 iRow = 1
 iCol = 4
 oString = MyTable.GetCellString(iRow, iCol)
 
o Sub GetCellsMerge( oListOfMergeCells)
Returns the merge cells.
Parameters:
oListOfMergeCells
@param oListOfMergeCells List of merge cells.
Example:
This example returns the merge cells of the drawing table MyTable.
 nbrow = MyTable.NumberOfRows
 nbcol = MyTable.NumberOfColumns
 sizetab = nbrow*nbcol
 ReDim infoMerge (sizetab-1)
 MyTable.GetCellsMerge(oListOfmergeCells)
 
o Func GetColumnSize( iCol) As
Returns the width of a column of a drawing table.
Parameters:
iCol
The cell column
oColSize
The cell width in mm. It corresponds to the size of the widest cell of the column or at least the size set with CATIADrawingTable::SetColumnSize.
Example:
This example returns the width of the column (1) of the drawing table MyTable.
 iCol = 1
 oColSize = MyTable.GetColumnSize(iCol)
 
o Sub GetMergeInfos( iRow,
iCol,
oFirstRow,
oFirstCol,
oNbRow,
oNbCol)
Returns informations about a group of merge cells from a cell.
Parameters:
iRow
@param iCol cell of merge
iFirstRow
Row of the first cell of the group Column of the first cell of the group
iNbRowMerge
Number of rows of the group
iNbColMerge
Number of columns of the group
Example:
This example returns informations of a group of merge cells from cell (2, 3) of the drawing table MyTable.
 MyTable.GetMergeInfos 2, 3, oFirstRow, oFirstCol, oNbRow, oNbCol
 
o Func GetRowSize( iRow) As
Returns the height of a row of a drawing table.
Parameters:
iRow
The cell row
oRowSize
The cell height in mm. It corresponds to the size of the highest cell of the row or at least the size set with CATIADrawingTable::SetRowsize.
Example:
This example returns the height of the row (1) of the drawing table MyTable.
 iRow = 1
 oRowSize = MyTable.GetRowSize(iRow)
 
o Sub InvertMode( iMode)
Sets a mode of table inversion.
Example:
This example swaps the columns of the drawing table MyTable.
 MyTable.InvertMode CatInvertColumn
 
o Sub MergeCells( iFirstRow,
iFirstCol,
iNbRowMerge,
iNbColMerge)
Merges a group of cells.
Parameters:
iFirstRow
@param iFirstCol First cell of merge
iNbRowMerge
Number of rows to merge
iNbColMerge
Number of columns to merge
Example:
This example merges cells from cell (2, 3) to cell (4, 5) of the drawing table MyTable.
 MyTable.MergeCells 2, 3, 3, 3
 
o Sub Move( iDeltaX,
iDeltaY)
Moves the table relatively to its original position.
Parameters:
iDeltaX
The X deviation
ideltaY
The Y deviation
Example:
This example moves the table MyTable to 20mm in X.
 DeltaX = 20.0
 DeltaY =  0.0
 MyTable.Move DeltaX, DeltaY
 
o Sub RemoveColumn( iCol)
Removes the indicated column.
Parameters:
iCol
The column to remove
Example:
This example removes the first column of the drawing table MyTable.
 iCol = 1
 MyTable.RemoveColumn iCol
 
o Sub RemoveRow( iRow)
Removes the indicated row.
Parameters:
iRow
The row to remove
Example:
This example removes the third row of the drawing table MyTable.
 iRow = 3
 MyTable.RemoveRow iRow
 
o Sub Rotate( iDeltaAngle)
Rotates the table relatively to its original position.
Parameters:
iDeltaAngle
The angle of rotation from the current position
Example:
This example rotates the table MyTable to 45 degrees.
 PI = 3.1415926535
 MyTable.Rotate PI/4
 
o Sub SetCellAlignment( iRow,
iCol,
iAlign)
Sets the pointed cell alignment of a drawing table.
Parameters:
iRow
The cell row
iCol
The cell column
iAlign
The type of alignment to be applied
Example:
This example sets the cell (3,2) alignment of the table MyTable to bottom left.
 iRow = 3
 iCol = 2
 MyTable.SetCellAlignment iRow, iCol, CatTableBottomLeft
 
o Sub SetCellBorderType( iRow,
iCol,
iType)
Sets the pointed cell border type of a drawing table.
Parameters:
iRow
The cell row
iCol
The cell column
iType
The type of border to be applied
Example:
This example sets the cell (3,2) border type of the table MyTable to right.
 iRow = 3
 iCol = 2
 MyTable.SetCellBorderType iRow, iCol, CatTableRight
 
o Sub SetCellName( iRow,
iCol,
iName)
Sets the name of a table cell.
Parameters:
iRow
The cell row
iCol
The cell column
iName
The cell name
Example:
This example sets the name of the cell (1,2) of the table MyTable to "Cell 2".
 iRow = 1
 iCol = 2
 iName = "Cell 2"
 MyTable.SetCellName iRow, iCol, iName
 
o Sub SetCellObject( iRow,
iCol,
iText)
Sets an object in a cell of a drawing table.
Parameters:
iRow
The cell row
iCol
The cell column
iText
The Drawing Text to set in the cell
Example:
This example puts the drawing text iText in the cell (1,3) of the table MyTable.
 iRow = 1
 iCol = 3
 MyTable.SetCellObject iRow, iCol, iText
 
o Sub SetCellString( iRow,
iCol,
iString)
Fills in a table cell with a string.
Parameters:
iRow
The cell row
iCol
The cell column
iString
The Text to be set
Example:
This example fills in the cell (3,2) of the table MyTable with "Title".
 iRow = 3
 iCol = 2
 iString = "Title"
 MyTable.SetCellString iRow, iCol, iString
 
o Sub SetColumnSize( iCol,
iColSize)
Sets the width of a column of a drawing table.
Parameters:
iCol
The cell column
iColSize
The cell width in mm. If 0, the width is automatic (corresponds to the size of the widest cell of the column).
Example:
This example sets the width of the column (1) of the drawing table MyTable to 20.
 iCol = 1
 iColSize = 20
 MyTable.SetColumnSize iCol, iColSize
 
o Sub SetRowSize( iRow,
iRowSize)
Sets the height of a row of a drawing table.
Parameters:
iRow
The cell row
iRowSize
The cell height in mm. If 0, the height is automatic (corresponds to the size of the highest cell of the row).
Example:
This example sets the height of the row (1) of the drawing table MyTable to 20.
 iRow = 1
 iRowSize = 20
 MyTable.SetRowSize iRow, iRowSize
 
o Sub UnMergeCells( iRow,
iCol)
Unmerges a group of cells.
Parameters:
iRow
@param iCol A cell of a merge
Example:
This example unmerges a group of cells of the drawing table MyTable from the cell (3, 5).
 MyTable.UnMergeCells 3, 5
 

Copyright © 2006, Dassault Systèmes. All rights reserved.