Properties
- 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
- 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
- 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
- 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
- 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
- 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
- Property OrientationReference() As
-
Returns or sets the orientation reference of the drawing table.
0 : Sheet orientation
1 : View/Label/2Dcomponent orientation- Example:
-
This example sets the orientation reference of MyTable drawing table to view orientation
MyTable.OrientationReference = 1
- Property TextProperties() As (Read Only)
-
Returns the text properties of the drawing table.
Allows to modify the whole table properties.
- Example:
-
This example retrieves in TextProperties the text properties of
the MyTable drawing table.
Dim TextProperties As DrawingTextProperties Set TextProperties = MyTable.TextProperties
- 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
- 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
- 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
- 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
- Func GetCellAlignment( iRow, iCol) As
-
Retrieves the alignment of the pointed cell of a drawing table.
- Parameters:
-
- iRow
- The cell row dd>
- iCol
- The cell column dd>
- 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)
- Func GetCellBorderType( iRow, iCol) As
-
Retrieves the drawing text contained in the cell of a drawing table.
- Parameters:
-
- iRow
- The cell row dd>
- iCol
- The cell column dd>
- 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) !!!! WARNING oType is not defined as the enum does but as it is documented in the SetCellBorderType method if oType == 15 it means border is set to left, top, right and bottom. if oType == 8 it means border is set to bottom.
- Func GetCellName( iRow, iCol) As
-
Returns the name of a table cell.
- Parameters:
-
- iRow
- The cell row dd>
- iCol
- The cell column dd>
- 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)
- Func GetCellObject( iRow, iCol) As
-
Retrieves the object contained in the cell of a drawing table.
- Parameters:
-
- iRow
- The cell row dd>
- iCol
- The cell column dd>
- 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)
- Func GetCellString( iRow, iCol) As
-
Returns the string contained in the cell of a drawing table.
- Parameters:
-
- iRow
- The cell row dd>
- iCol
- The cell column dd>
- 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)
- 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)
- Func GetColumnSize( iCol) As
-
Returns the width of a column of a drawing table.
- Parameters:
-
- iCol
- The cell column dd>
- 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)
- 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 dd>
- iFirstRow
- Row of the first cell of the group Column of the first cell of the group dd>
- iNbRowMerge
- Number of rows of the group dd>
- 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
- Func GetRowSize( iRow) As
-
Returns the height of a row of a drawing table.
- Parameters:
-
- iRow
- The cell row dd>
- 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)
- Sub InvertMode( iMode)
-
Sets a mode of table inversion.
- Example:
-
This example swaps the columns of the drawing table MyTable.
MyTable.InvertMode CatInvertColumn
- Sub MergeCells( iFirstRow, iFirstCol, iNbRowMerge, iNbColMerge)
-
Merges a group of cells.
- Parameters:
-
- iFirstRow
- @param iFirstCol First cell of merge dd>
- iNbRowMerge
- Number of rows to merge dd>
- 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
- Sub Move( iDeltaX, iDeltaY)
-
Moves the table relatively to its original position.
- Parameters:
-
- iDeltaX
- The X deviation dd>
- 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
- 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
- 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
- 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
- Sub SetCellAlignment( iRow, iCol, iAlign)
-
Sets the pointed cell alignment of a drawing table.
- Parameters:
-
- iRow
- The cell row dd>
- iCol
- The cell column dd>
- 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
- Sub SetCellBorderType( iRow, iCol, iType)
-
Sets the pointed cell border type of a drawing table.
- Parameters:
-
- iRow
- The cell row dd>
- iCol
- The cell column dd>
- iType
- The type of border to be applied
----- 2 ------ -------------- -------------- | | |\ | | / | | | | \ | | / | 1 4 | \ 16 | | 32 / | | | | \ | | / | | | | \ | | / | ----- 8 ------ -------------- --------------- Example:
-
This example sets the cell (3,2) border type of the table MyTable
to right and left. (1+4)
iRow = 3 iCol = 2 MyTable.SetCellBorderType iRow, iCol, 5
- Example:
-
This example sets the cell (1,1) border type of the table MyTable
to all border out line (left, top, right and bottom). (1+2+4+8 = 15)
iRow = 3 iCol = 2 MyTable.SetCellBorderType iRow, iCol, 15
- Sub SetCellName( iRow, iCol, iName)
-
Sets the name of a table cell.
- Parameters:
-
- iRow
- The cell row dd>
- iCol
- The cell column dd>
- 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
- Sub SetCellObject( iRow, iCol, iText)
-
Sets an object in a cell of a drawing table.
- Parameters:
-
- iRow
- The cell row dd>
- iCol
- The cell column dd>
- 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
- Sub SetCellString( iRow, iCol, iString)
-
Fills in a table cell with a string.
- Parameters:
-
- iRow
- The cell row dd>
- iCol
- The cell column dd>
- 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
- Sub SetColumnSize( iCol, iColSize)
-
Sets the width of a column of a drawing table.
- Parameters:
-
- iCol
- The cell column dd>
- 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
- Sub SetRowSize( iRow, iRowSize)
-
Sets the height of a row of a drawing table.
- Parameters:
-
- iRow
- The cell row dd>
- 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
- 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