Functions Introduced:
Superseded Functions:
Use the function
ProTableIsFromFormat() to determine if the specified table is associated with the format. If the table is associated with the format, the output
argument
from_format is a
ProBoolean PRO_B_TRUE, else it is
PRO_B_FALSE.
Note
This function is applicable for Drawing only.
Both ProDwgtableRowAdd() and ProDwgtableColumnAdd() are deprecated. Use the functions ProTableRowAdd() and ProTableColumnAdd() instead.
Use the function
ProTableRowAdd() to add a row to the specified table. The input arguments are as follows:
|
• |
table—Specify the table. |
|
• |
insert_after_row— row after which the new row is to be added. Row numbers start with 1. Pass the value 0 to insert the new row at the top of the table. To append the row in the last, pass a value less than 0.(any negative value). |
|
• |
display—flag that indicates if the table is to be displayed after creation. |
|
• |
height_in_chars—height of the row in characters. Pass -1 to take value of previous row. |
Note
The function returns the error PRO_TK_GENERAL_ERROR if you try to insert the row in the middle of the non-template element of a repeat region.
Use the function
ProTableColumnAdd() to add a column to the specified table. The input arguments are as follows:
|
• |
table—Specify the table. |
|
• |
insert_after_col— column after which the new column is to be added. Column numbers start with 1. Pass the value 0 to insert the new columns at the top of the table. To append the column in the last, pass a value less than 0 (any negative value). |
|
• |
display—flag that indicates if the table is to be displayed after creation. |
|
• |
width_in_chars—width of the column in characters. Pass -1 to take value of previous column. |
Both ProDwgtableRowDelete() and ProDwgtableColumnDelete() are deprecated. Use the functions ProTableRowDelete() and ProTableColumnDelete() instead.
Use the function ProTableRowDelete() to delete the specified row from the specified table.
Use the function ProTableColumnDelete() to delete the specified column from the specified table.
For both the functions ProTableRowDelete() and ProTableColumnDelete(), the input argument display specifies the flag that indicates if the table is to be displayed after creation. If TRUE, the table is displayed, if FALSE, the table is not displayed.
Use the function
ProTableRowHeightGet() to get the row height of the specified table. The input arguments are as follows:
|
• |
table—Specify the table. |
|
• |
size_type—size type is specified using the enumerated data type ProTableSizetype. If you specify PROTABLESIZE_CHARACTERS, the row_height is rounded down. To avoid this, use PROTABLESIZE_CHARS_TRUE. |
Use the function
ProTableRowHeightSet() to set the row height of the specified table. The input arguments are as follows:
|
• |
table—Specify the table. |
|
• |
size_type—size type is specified using the enumerated data type ProTableSizetype If you specify PROTABLESIZE_CHARACTERS, the row_height will be rounded down. To avoid this, use PROTABLESIZE_CHARS_TRUE. |
Use the function
ProTableColumnWidthGet() to get the column width of the specified table. The input arguments are as follows:
|
• |
table—Specify the table. |
|
• |
column—column index. Column indices start at 1. |
|
• |
size_type—size type is specified using the enumerated data type ProTableSizetype If you specify PROTABLESIZE_CHARACTERS, the column_width will be rounded down. To avoid this, use PROTABLESIZE_CHARS_TRUE. |
Use the function
ProTableColumnWidthSet() to set the column width of the specified table. The input arguments are as follows:
|
• |
table—Specify the table. |
|
• |
column—column index. Column indices start at 1. |
|
• |
column_width—column width. |
|
• |
size_type—size type is specified using the enumerated data type ProTableSizetype If you specify PROTABLESIZE_CHARACTERS, the column_width will be rounded down. To avoid this, use PROTABLESIZE_CHARS_TRUE. |
Use the function
ProTableDataRowsSet() to set up row properties. The input arguments are as follows:
|
• |
data—Specify using the ProTableData structure. |
|
• |
n_rows—number of rows. The maximum number of rows that can be specified is 100. |
|
• |
heights—ProArray of row heights |
Use the function
ProTableDataColumnsSet() to set up the column properties. The input arguments are as follows:
|
• |
data—Specify using the ProTableData structure. |
|
• |
n_columns—number of columns. The maximum number of columns that can be specified is 50. |
|
• |
widths—ProArray of column widths. |
|
• |
justifications—ProArray of justifications using the enumerated data type ProHorzJust. |
Use the function
ProTableRowheightAutoadjustSet() to set the automatic height adjustment property for a specified row of the specified table. The input arguments are as follows:
|
• |
table—The reference to the table. |
|
• |
row—Row number for which the property is to be set. Row numbers start with 1. |
|
• |
auto_adjust—Set the property using the enumerated data type ProTableRowheightAutoadjusttype. The valid values are:
|
○
|
PROTBLROWHEIGHT_AUTOADJUST_TRUE—Sets the property. |
|
○
|
PROTBLROWHEIGHT_AUTOADJUST_FALSE—Unsets the property. |
|
Use the function
ProTableRowheightAutoadjustGet() to get the automatic height adjustment property for a specified row of the specified table. The input arguments are as follows:
|
• |
table—The reference to the table. |
|
• |
row—Row number for which the property is to be retrieved. Row numbers start with 1. |
|
• |
size_type—size type is specified using the enumerated data type ProTableSizetype. If you specify PROTABLESIZE_CHARACTERS, the row_height is rounded down. To avoid this, use PROTABLESIZE_CHARS_TRUE.
|
○
|
PROTABLESIZE_CHARACTERS |
|
○
|
PROTABLESIZE_MODEL_UNITS |
|
○
|
PROTABLESIZE_CHARS_TRUE |
|
The function returns the following output arguments:
|
• |
auto_adjust—Value for auto adjust property. |
|
• |
height—Auto adjusted height if auto_adjust is PROTBLROWHEIGHT_AUTOADJUST_TRUE. Ignore for PROTBLROWHEIGHT_AUTOADJUST_FALSE. |
The function ProDwgtableDelete() is deprecated. Use the function ProTableDelete() instead.
Use the function ProTableDelete() to delete the specified table.
The function ProDwgtableErase() is deprecated. Use the function ProTableErase() instead.
Use the function ProTableErase to erase the specified table. The input argument state is the combination state to erase from. Pass as NULL for drawing table.
The function ProDwgtableRotate() is deprecated. Use the function ProTableRotate() instead.
The function ProTableRotate() rotates the specified table (clockwise) by 90 degree. The function does not perform a display. The input argument display specifies the flag that indicates if the table is to be displayed after creation. If TRUE, the table is displayed, if FALSE, the table is not displayed.
Use the function
ProTableCellIsComment() to determine if the specified cell is a comment cell. The input arguments are as follows:
|
• |
table—Specify the table. |
|
• |
column—column index. Column indices start at 1. |
|
• |
row—row index. Row indices start at 1.
|
The function ProTableCellNoteGet() returns the note identifier for a specified cell of the table.
The function ProDwgtableCellsMerge() is deprecated. Use the function ProTableCellsMerge() instead.
The function ProDwgtableCellsRemesh() is deprecated. Use the function ProTableCellsRemesh() instead.
The function
ProTableCellsMerge() takes a rectangular region of cells and merges them into a composite cell. The merged cells, rows, or columns are deleted,
and the table's appearance is restored using
prodrw_remesh_table_cells().
Note
This function is equivalent to the user interface options Drawing, Table, Mod Rows/Col, Merge in Creo Parametric. Limitations in the user interface apply to the function as well. For example, borders of merge cannot intersect the borders
of another merge or repeat region.
The function
ProTableCellMergeGet() gets the merge information of a specified cell. The input arguments are:
|
• |
table—Specify the table using ProTable object. |
|
• |
row—Specify row of the cell. The row indices start at 1. |
|
• |
col—Specify column of the cell. The column indices start at 1. |
The function returns the following output arguments:
|
• |
is_merge—Returns a PRO_B_TRUE value if the cell is merged using a ProBoolean object. |
|
• |
start_row—Row index for start merge cell. The row indices start at 1. |
|
• |
start_col—Column index for start merge cell. The column indices start at 1. |
|
• |
end_row—Row index for end merge cell. The row indices start at 1. |
|
• |
end_col—Column index for end merge cell. The column indices start at 1. |
The function ProTableCellsRemesh() undoes all merges created in the specified rectangular region.
The function ProDwgtableCelltextWrap() wraps the text in a cell.
The function ProDwgtableSave() is deprecated. Use the function ProTableSave() instead.
Use the function
ProTableSave() to save the table in different format. The input arguments are:
|
• |
table—Reference to the table. |
|
• |
path—Full path of the location in which the table needs to be saved. |
|
• |
table_format—Format of the table defined using the enumerated data type ProTableFormattype. |
|
• |
segment_id—Segment of the table to save, if table_format is PROTABLEFORMAT_CSV or PROTABLEFORMAT_XLSX. |
In Creo Parametric 11.0.0.0, the enumerated data type ProDwgtableFormattype is deprecated. Use the enumerated data type ProTableFormattype instead. The valid values are:
|
• |
PROTABLEFORMAT_TBL—Specifies the tabular format. |
|
• |
PROTABLEFORMAT_TXT—Specifies the text format. |
|
• |
PROTABLEFORMAT_CSV—Specifies the CSV format. |
|
• |
PROTABLEFORMAT_XLSX—Specifies the XLSX format. |
ProDwgtableColumnWidthSet() and ProDwgtableRowHeightSet() assign the width of a specified column and the height of a specified row, respectively, depending upon the size of the drawing
table. The drawing table size given by the enumerated data type ProDwgtableSizetype can be of the following types:
|
• |
PRODWGTABLESIZE_CHARACTERS—Specifies the size in characters. If the specified value for width of a column or height of a row is a fraction, PRODWGTABLESIZE_CHARACTERS rounds down the fractional value to the nearest whole number. In Creo Parametric 11.0.0.0, PRODWGTABLESIZE_CHARACTERS is deprecated. |
|
• |
PRODWGTABLESIZE_SCREEN—Specifies the size in screen coordinates. |
|
• |
PRODWGTABLESIZE_CHARS_TRUE—Specifies the size in characters. It enables you to specify a fractional value for the width of a column and height of a
row. |
To accommodate a wrapped text in a table row, you can use the
Creo TOOLKIT functions to automatically adjust the height of the row to accommodate the entire text content. The functions
ProDwgtableRowheightAutoadjustGet() and
ProDwgtableRowheightAutoadjustSet() get and set the automatic row height adjustment property for a row of a drawing table. These functions use the enumerated
type
ProDwgtableRowheightAutoadjusttype, which has the following values:
|
• |
PRODWGTBLROWHEIGHT_AUTOADJUST_FALSE—Specifies that the automatic row height adjustment property is not set. |
|
• |
PRODWGTBLROWHEIGHT_AUTOADJUST_TRUE—Specifies that the automatic row height adjustment property is set. |
|
• |
PRODWGTBLROWHEIGHT_AUTOADJUST_TRUE_LEGACY—Specifies a pre-Creo Parametric 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 function ProDwgtableRowheightAutoadjustSet().
Note
|
○
|
The value PRODWGTBLROWHEIGHT_AUTOADJUST_TRUE_LEGACY is not applicable to the function ProDwgtableRowheightAutoadjustSet(). |
|
○
|
When using the function ProDwgtableRowheightAutoadjustSet() any changes in the height of a row will be seen only after the next regeneration, or a call to the function ProDrawingTablesUpdate(). |
|