KB: Add line number to a BOM template

Altium Designer Altium Designer
Starting in version: 18 Up to Current

How to format BOM template column to include line # (line number). Unable to add Line # using the Column=Line Number Format in a BOM Template

Solution Details

The native way is to use an ActiveBOM and add the line numbers in the BomDoc. Reference: https://www.altium.com/documentation/altium-designer/activebom-bom-management#!line-number-column

The Column declaration in the Excel template is replaced by the ColumnName string, with each row below being populated by that column value for each BOM Item.

Columns are used in the format:


An example would be Column=Designator. 
In order to include Line #'s from the Active BOM  in a BOM template, the format is Column=Line #

The ActiveBOM can add automatically populate the Line #'s for you, first you will want to make sure the Line # column is enabled in the Properties >> Columns tab of the ActiveBOM document. Once enabled, near the top of the BomDoc click the "Set Line Numbers" button to automatically create the line numbers for the components. If you are trying to define this in the Excel template itself, you would need to create a new column and In the first few fields in the column set the value to =Row() to create the line numbers.

"Click the Set line numbers button (Set Line Numbers button, click the arrow to configure line numbering) in the Base view to add a line number to each row. Click the dropdown icon on the right of the button to open the Line # Options dialog, where the start and increment values can be defined. Refer to the Line Number Column section to learn more."


Here is additional documentation that may be of interest:

Here's a list of pre-defined special strings:

Here's information on User-Defined project parameters:


If you want to turn on/off columns, it can be done in the Properties panel.

You would also need to configure the start number as well as the incrementation:

If you opt to not include ActiveBOM in your project, this system-reserved parameter 'Line #' (introduced first when ActiveBom was introduced) does not show up as one of available parameters above.

For the non-interactive way, you will have to use an excel template. You can simply add a new column titled line number for example then enter the formula: =ROW() into each field. It will then populate the number in the following rows as it is generated. Configure the outjob to point to that template.

If you find an issue, select the text/image and pressCtrl + Enterto send us your feedback.
Was this article helpful?