ReportBOM
- Updated2026-03-24
- 2 minute(s) read
Creates a bill of materials (BOM) from the current circuit in Multisim.
Syntax
Function ReportBOM (_
ByVal realFlag As Boolean,_
ByVal format As ExportFormat,_
[ByVal FileName As String])_
As String
Parameters
realFlag—If True, the BOM consists of only real components. If False, it will contain virtual components. In this case, any component without a package mapping is considered virtual.
format—The format to export the report in, as defined by the enum ExportFormat. For user readable output, use ExportText. For programmatic parsing of the output, use ExportCSV.
fileName—Indicates the name of the file to which the BOM should be written. If it is missing or blank, then the report will be returned in the output string.
Remarks
The report may be saved to a file or returned as a string. If the report is saved to a file, the fully-qualified path to the output file is returned. If the fileName is invalid, an error occurs.
If there are no components of the appropriate type to display, and fileName is specified, then no file is generated. If fileName is not specified, then the return string is blank.
The BOM includes the top-level circuit, as well as any subcircuits or hierarchical blocks.
Unicode strings are stored according to the global setting in Multisim, "Save .TXT files as plain text". This is found in the Save tab of the Global Options dialog box.
Example
' Generate a Bill of Materials Report for real components
' and save the output to a file
Dim report As String
report = Circuit.ReportBOM(false, ExportText, "")
MsgBox report