User's guide > Drawings > Drawing Tables > Drawing Tables Operations
Drawing Tables Operations
Methods Introduced:
The method pfcTable.Table.Erase erases the specified table temporarily from the display. It still exists in the drawing. The erased table can be displayed again using the method pfcTable.Table.Display. The table will also be redisplayed by a window repaint or a regeneration of the drawing. Use these methods to hide a table from the display while you are making multiple changes to the table.
The method pfcTable.Table.RotateClockwise rotates a table clockwise by the specified amount of rotation.
The method pfcTable.Table.InsertRow inserts a new row in the drawing table. Set the value of the parameter RowHeight to specify the height of the row. Set the value of the parameter InsertAfterRow to specify the row number after which the new row has to be inserted. Specify 0 to insert a new first row.
The method pfcTable.Table.InsertColumn inserts a new column in the drawing table. Set the value of the parameter ColumnWidth to specify the width of the column. Set the value of the parameter InsertAfterColumn to specify the column number after which the new column has to be inserted. Specify 0 to insert a new first column.
The method pfcTable.Table.MergeRegion merges table cells within a specified range of rows and columns to form a single cell. The range is a rectangular region specified by the table cell on the upper left of the region and the table cell on the lower right of the region.
The method pfcTable.Table.SubdivideRegion removes merges from a region of table cells that were previously merged. The region to remove merges is specified by the table cell on the upper left of the region and the table cell on the lower right of the region.
The methods pfcTable.Table.DeleteRow and pfcTable.Table.DeleteColumn delete any specified row or column from the table. The methods also remove the text from the affected cells.
The method pfcTable.Table.SetText sets text in the table cell.
Use the method pfcTable.TableOwner.DeleteTable to delete a specified drawing table from the model permanently. The deleted table cannot be displayed again.
* 
Many of the above methods provide a parameter Repaint If this is set to true the table will be repainted after the change. If set to false or null Creo will delay the repaint, allowing you to perform several operations before showing changes on the screen.
The method wfcTable.WTable.GetGrowthDirection and wfcTable.WTable.SetGrowthDirection gets and sets the growth direction of the table using the enumerated type wfcTable.TableGrowthDirType.
The valid values for growth direction are defined in the enumerated data type wfcTable.TableGrowthDirType:
TABLEGROWTHDIR_DOWNRIGHT
TABLEGROWTHDIR_DOWNLEFT
TABLEGROWTHDIR_UPRIGHT
TABLEGROWTHDIR_UPRIGHT
The methods wfcTable.WTable.GetRowHeightAutoAdjustType and wfcTable.WTable.SetRowHeightAutoAdjustType get and set the automatic row height adjustment property for a row of a drawing table. The type of height adjustment property is defined in the enumerated data type wfcTable.RowheightAutoadjustType:
TBLROWHEIGHT_AUTOADJUST_FALSE— Specifies that the automatic row height adjustment property is not set.
TBLROWHEIGHT_AUTOADJUST_TRUE— Specifies that the automatic row height adjustment property is set.
TBLROWHEIGHT_AUTOADJUST_TRUE_LEGACY— Specifies a pre- 1.0 release behavior. In this behavior, sometimes the row height may be automatically adjusting and sometimes may not be automatically adjusting. To set an explicit row adjustment status use the method wfcTable.WTable.SetRowHeightAutoAdjustType.
The method wfcTable.WTable.Save saves a drawing table in different formats. The formats given by the enumerated type wfcTable.TableFormatType can be of the following types:
TABLEFORMAT_TBL—Specifies the tabular format.
TABLEFORMAT_TBL—Specifies the tabular format.
TABLEFORMAT_CSV—Specifies the CSV format.
TABLEFORMAT_XLSX—Specifies the XLSX format.
The methods wfcTable.WTable.SetColumnWidth and wfcTable.WTable.SetRowHeight assign the width of a specified column and the height of a specified row depending upon the size of the drawing table. The drawing table size given by the enumerated data type pfcTable.TableSizeType:
TABLESIZE_BY_NUM_CHARS—Specifies the size in characters. If the specified value for width of a column or height of a row is a fraction, TABLESIZE_BY_NUM_CHARS rounds down the fractional value to the nearest whole number.
TABLESIZE_BY_LENGTH—Specifies the size in screen coordinates.
TABLESIZE_BY_TRUE_CHARS—Specifies the size in characters, but allows fractional values for column width and row height.
The method wfcTable.WTable.WrapCelltext wraps the text in a cell.
The method wfcTable.WTableCreateInstructions.GetPlane and wfcTable.WTableCreateInstructions.SetPlane gets and sets the annotation plane for the table.
Use the method wfcTable.WTable.Delete to delete the specified table.
The method wfcTable.WTable.DisplayInCombState displays the table in the specified combination state.
The method wfcTable.WTable.EraseFromCombState erases the table from the specified combination state.
The method wfcTable.WTable.GetOrigin gets the origin of the table.
The method wfcTable.WTable.GetAnnotationPlane gets the annotation plane for solid tables.
The method wfcTable.WTable.GetCellMergeInfo gets merge information of the specified cell.
The method wfcTable.WTable.GetCellBlankStatuses gets blank border information of the specified cell.
The method wfcTable.WTable.GetCellFillColor gets the fill color of the specified cell.
The method wfcTable.WTable.GetBorderStyle gets the line style of table borders and is specified using the interface pfcTable.TableBorderStyle.
The method wfcTable.WTable.GetColumnWidth gets the column width of a table and is specified using the interface pfcTable.TableSizeType.
The method wfcTable.WTable.GetRowHeight gets the row height of a table and is specified using the interface pfcTable.TableSizeType.
The method wfcTable.WTable.GetRowHeightWithAutoAdjust gets the row height along with automatic row height adjustment information for a row of a table. The input arguments are:
Row—Row number for which the property is to be retrieved. Row numbers start with 1.
SizeType—size type is specified using the interface wfcTableSizeType. If TABLESIZE_BY_NUM_CHARS, then row height will be rounded down. To avoid this, use TABLESIZE_BY_NUM_CHARS_TRUE.
Use the method wfcTable.WTable.AddReferences to add the specified table references.
Use the method wfcTable.WTable.GetReferences to get the table references.
Use the method wfcTable.WTable.DeleteReference to delete the table reference.
Use the method wfcTable.WTable.GetCellSegmentId to get the region id from the specified table cell.
Was this helpful?