Share
 
 

Adding cells

To add a cell to a row:

  1. In your custom template set, locate the HTML file that you want to edit, and open it with a text editor.
  2. Locate the row where you'd like to insert your cell, for example:

    <tr>

    <th>PowerMILL Version</th><td>{version} CodeBase {codebase}</td>

    </tr>

  3. Add a new line immediately above the </tr> tag, and enter the details of the cell. For example, to add a cell that displays the project year, enter:

    <th>Year</th><td>{project.year}</td>

    The <th></th> tags contain the label for the cell; the <td></td> tags contain the value.

  4. Save the file.
  5. Test the template to check if you are satisfied with the results.

To add a row of cells:

  1. In your custom template set, locate the HTML file that you want to edit, and open it with a text editor.
  2. Locate the table area where you'd like to add new rows, for example:

    <tr>

    <th>PowerMILL Version</th><td>{version} CodeBase {codebase}</td>

    </tr>

  3. Add the details of the new row immediately above the </tr> tag. For example, to add a row that displays the project date, enter:

    <tr>

    <th>Project Date</th><td>{project.date}</td>

    </tr>

    The <tr></tr> tags create the new row; <th></th> tags contain the label for the cell; and the <td></td> tags contain the value.

  4. Save the file.
  5. Test the template to check if you are satisfied with the results.

To add a cell to a merged column:

  1. In your custom template set, locate the HTML file that you want to edit, and open it with a text editor.
  2. Locate the merged column area (indicated by the colspan attribute). For example, <td colspan="3">

    Add a new line immediately after the tag, and enter the details of the cell. For example, to add a cell that displays the block type, enter: {block.type}/

    The code should look like this:

    <tr>

    <th>Block</th>

    <td colspan="3">

    {block.type}/

    {block.limits.x.max-block.limits.x.min} &times;

    {block.limits.y.max-block.limits.y.min} &times;

    {block.limits.z.max-block.limits.z.min}

    </td>

    </tr>

  3. Because you have added an extra cell to the column, you must increment the colspan attribute to include the new cell:

    <td colspan="4">

    If you do not increment the colspan, the cell creates a new column.

  4. Save the file.
  5. Test the template to check if you are satisfied with the results.

To add a cell to a merged row:

  1. In your custom template set, locate the HTML file that you want to edit, and open it with a text editor.
  2. Locate the merged row area (indicated by the rowspan attribute). For example:

    <tr>

    <td rowspan="3">{strategy}</td>

    </tr>

    <tr>

    <th>Diameter</th><td>{tool.diameter}</td>

    </tr>

    <tr>

    <th>Tip radius</th><td>{tool.tip_radius}</td>

    </tr>

    <tr>

    <th>Length</th><td>{tool.length}</td>

    </tr>

  3. Add the details of the new row. For example, to add a cell that displays the tool number, enter:

    <tr>

    <th>Number</th><td>{tool.number}</td>

    </tr>

  4. Because you have added an extra cell to the row, you must increment the rowspan attribute to include the new cell:

    <td rowspan="4">

    If you do not increment the rowspan, the new cell creates a new row.

  5. Save the file.
  6. Test the template to check if you are satisfied with the results.

Was this information helpful?