Importing Partlist Properties From External Datasource
The PART_PROPERTY_DB_FILE
configuration setting (CSet) allows you to import part properties from a spreadsheet file or a SQL database. If you leave this setting blank, NetBom will not import any extra part properties.
The CSet PART_NUMBER_PROPS
is used to select part number property names. By default, it has a value of PART_NUMBER
but can contain a comma-separated list of properties to check against. This is particularly useful when using several designs that have part numbers with different property names, or if the part number column in the database/spreadsheet has a different name than the design it is being merged into.
To use a spreadsheet as the source of your part properties, make sure that the file extension is not .txt. NetBom will only recognize spreadsheet files with a different file extension (because .txt is considered a SQL database source).
To use a SQL database as the source of your part properties, the file must be a .txt file and should contain the following information in the specified format:
DSN=DBI:mysql:ce_test_db;host=localhost;port=3306
USERNAME=username
PASSWORD=password
QUERY=SELECT * FROM ce_test_db.ce_partlist;
It's important to note that each setting has to be on a single row, including the query, but the order of these properties in the file does not matter and the keys (e.g. DSN, USERNAME) are case-insensitive.
If you choose to use a spreadsheet as the source for your part properties, the spreadsheet must be in a specific format in order to be successfully imported.
The spreadsheet can be a single-sheet or a multi-sheet document. Each sheet should contain a header row and value rows (but it does not need to be formatted as an Excel table). The header row should contain the names of the part properties, and the value rows should contain the corresponding values for each part.
It is important that each sheet contains a column for the part number, as this is required for NetBom to properly import the part properties. Each row must also contain a value in the part number field or it will be skipped during the import process.
In summary, the spreadsheet should have the following format:
A single-sheet or multi-sheet document
A header row with the names of the part properties
Value rows containing the corresponding values for each part
A column for the part number on each sheet
A value in the part number field for each row.