α: the Tables plugin is currently in alpha state.
The Tables plugin is a standalone extension to the priint:comet Illustrator plugins. It can either be used without comet functionality (standalone mode) or in conjunction with the priint:comet Plugins to extend and interoperate with the existing toolset (extension mode).
The plugin Tables only provides the user interface and is optional when running in extension mode - in this case tables can still be accessed using cScript. When used in standalone mode it is neccesary.
The Tables plugin provides the ability to create, modify and introspect table-like object structures inside an Illustrator document. It closely mimics how tables work in InDesign, using native Illustrator document objects like text frames, rectangles and groups. Interactive tools and script commands (in extension mode) are provided to enable artists and developers alike.
There are two modes in which the table module can operate:
In this mode the table module is running without priint:comet functionality like placeholders, layout rules, etc...
This mode provides interactive UI tools and panels to manually create tables inside your Illustrator documents and style them according to your needs.
This mode requires the tables license
This mode contains all functionality of the standalone mode, plus additional functionality provided by priint:comet like a library of cScript commands to automatically create and modify tables, e.g. from external sources like Excel files
This mode requires the priint:comet basic license
For both modes you will need to have the CoreService and Tables plugins installed.
Since tables are built using native Illustrator art objects, there is a fixed structure in which they are created and managed.
This structure must never be changed manually, else all table tools will cease to function!
A table is an Illustrator group containing groups for each cell which in turn contain objects for strokes, fill and the actual content.
Even though some objects inside may be hidden, they are still needed and the visibility of these objects is managed by the tables module itself.
There are two ways to create a table:
Interactive creation is accessed either through the menu command Object->priint:comet->Tables->Create or through the tables panel, using the Create button
In both cases a dialog prompts the designated table dimensions and table style:
When this dialog is accepted, an interactive creation tool is activated, enabling the creation of a table in the document by dragging the size directly onto the artboard.
Through cScript commands (extension mode)
In extension mode tables can be created and modified using cScript commands, enabling procedural generation through external means, e.g. an Excel file etc..
A table is considered selected when the table group itself is directly selected and not only indirectly by selecting any child object underneath:
For some functionality it is required to properly select the table.
A cell is considered selected when either the cell group itself is directly selected, or any child object underneath. In the picture below, both cells 0,0 and 0,1 are considered selected:
For some functionality it is required to properly select the cells you wish to operate on.
It can sometimes be cumbersome to properly select a cell using tools on the artboard, especially when the table intersects other elements on the artboard. For this reason we provide a selection tool found in the same tool group as the table resize tool which can only be used to select table cells.
To use this tool follow these steps:
A line (row or column) is considered selected, when a cell on that line is selected.
Since tables are created using native Illustrator objects, they can be modified as such.
However, it is important to follow certain rules to retain the functionality provided by the Tables plugin! Not following these rules will invalidate any Tables functionality!
There are three ways to move a table inside the Illustrator document:
Default selection tool
Inputting position coordinates into the Illustrator control bar
For this, the table group needs to be selected.
cScript (extension mode)
Use the function frame::moveto
The table size, aswell as row, column, stroke and content sizes may only be modified using the provided tools
There are two ways to modify the size of a table:
Resize table tool
For changing sizes of a table, aswell as row heights and column widths, the interactive Resize Table tool is provided.
It can only be activated when a table (and only a table) is selected.
When activating the tool, the mouse cursor changes depending on where it hovers over the table. Dragging at certain positions will resize the table or its rows and columns individually.
Dragging at one of the eight anchor points (Top Left, Top Center, Top Right, etc...) will resize the table uniformly while the opposite point is fixed in place.
Dragging at a delimiting line of a row or column will resize the line accordingly.
cScript (extension mode)
There are two ways to rotating a table:
In the UI, table rotation may only ever be changed using Illustrator's rotate tool:
While it is possible to rotate any object in Illustrator by using the selection tool and dragging along the corner points of an object's bounding box, this actually does reset any stored rotation values to 0, making it impossible to determine the rotational values afterwards.
cScript (extension mode)
Use the function frame::rotate using the table group as the frameRef parameter.
Changing dimensions (row or column count) is done through the tables panel or menu commands found at Object->priint:comet->Tables->Insert/Remove
When using the tables panel to add lines to the table, the lines are always added behind the last one.
When adding lines to the table through the menu command, the currently selected lines are respected and a dialog prompts how many lines to add and where to add them (before/after) relative to the currently selected lines.
When using the tables panel to remove lines from the table, the lines are always removed at the end.
When removing lines to the table through the menu command, the currently selected lines are respected and removed.
There are two possible types of cells:
Uses a text frame to place the content. Applies text-cell specific attributes from cell styles and overrides.
Places a graphic item as the content. Applies graphic-cell specific attributes from cell styles and overrides.
The default cell type when creating a table is always Text.
To convert a cell to a different type, select the cell you wish to convert and use the Tables panel and the buttons underneath the Cell types category to convert the cell type.
When converting to a graphic cell you are immediately prompted to select a file to use as the graphic source. This is because there cannot be empty graphic frames in Illustrator.
The Tables plugin supports merged cells - cells that span more than one row, column or both.
There are three ways to merge multiple cells to one. For each a continuous area of cells (without holes inbetween) has to be selected:
When merging cells, the top left cell is the target cell which determines which overrides are retained and which cell type the result will have. When multiple text cells are merged to a single text cell, all text content is (paragraph delimited) into the result cell content.
The Tables plugin provides four ways to modify the look of a cell: Table styles, table overrides, cell styles and cell overrides.
Table styles, cell styles etc... can set the same attribute (e.g. the cell fill color) which seemingly conflicts. For this reason the following attribute resolution order is applied:
Cell override > Cell style (unless default) > Table override > Table style (unless default) > Default
Example for determining a cell fill color:
Cell overrides apply fill color?
True: Apply, done!
Cell style explicitly applies fill color in inheritance chain?
True: Apply, done!
Table overrides apply fill color through a pattern? True: Apply, done!
Table style applies fill color in inheritance chain through a pattern?
True: Apply, done!
False: Use default.
Table styles configure the overall look of a table and can also apply individual attributes to a cell. Table styles are applied directly to a table and changing the style itself changes all tables it is applied to.
Table styles are stored per document and are managed using the table styles panel. A double click on an entry in the table styles panel opens the Table Style Setup dialog.
Apply a table style by selecting a table you wish to change and then select the table style you wish to apply in the table styles panel.
Table styles can be inherited and only store the attributes which they override from their inherited style.
Table overrides configure deviations from the applied table style on a per-table basis
Table overrides can be configured using the Table Setup dialog, which is opened using the menu command Object->priint:comet->Tables->Table Setup or using the Tables panel and the Table Setup button. For both methods a single table must be selected.
Cell styles provide advanced options for determining the look of a cell. Cell styles can either be applied through table styles or by directly applying a cell style to a cell.
Cell styles are stored per document and are managed using the cell styles panel. A double click on an entry in the cell styles panel opens the Cell Style Setup dialog.
Apply a cell style by selecting the cells you wish to change and then select the cell style you wish to apply in the cell styles panel.
Cell overrides configure deviations from the applied table and cell style on a per-cell basis
Cell overrides can be configured using the Cell Setup dialog, which is opened using the menu command Object->priint:comet->Tables->Cell Setup or using the Tables panel and the Cell Setup button. For both methods a any number of cells can be selected, but all cells must belong to the same table.
When used in extension mode, the priint:comet plugins can create and modify tables using cScript. While the cScript implementation closely follows the InDesign implementation, there are a few differences to consider:
When creating and modifying a table, performance may start to degrade depending on the type and count of operations performed.
Here are some strategies to help prevent the performance degradation when using scripting to alter your tables: