BOM

<< Click to Display Table of Contents >>

Navigation:  Programming Mechworks PDM > DBWCommandShell > Commands Reference > BOM >

BOM

Description

Creates the BOM (Bill Of Materials) for the the current selected document and activates the Query page

Syntax

call DBWShell("Bom [DocUid][DepthLevel]")

Parameters

DocUid

Optional. unique id of the document to create the bom of.
Default value is 0 (current selected document).

DepthLevel

Optional. the depth level of the Bom to be created.
Default depth value is 1.

Results

@EXCEL_FILE_PATH

Excel .XLSX file created by the BOM procedure

Remarks

PDM browser must be open even if a unique id is passed.

Example

' Select the main assembly in the documents Page ( use '|' char for spaces )

call DBWShell( "SelectById " & docId )
if (okDBW = False) then exit sub
' Create the BOM for that assembly ( switch DBWorks to the Query page )
call DBWShell( "Bom" )
if (okDBW = False) then exit sub
' after the bom, show the created excel file
excelFile = DBWResult( "@EXCEL_FILE_PATH" )
DBWMsgBox "BOM OUTPUT AVAILABLE IN: " & excelFile

more examples

Bom  ' currently selected document and DepthLevel = 1

Bom 0 2  ' currently selected document and DepthLevel = 2
Bom 77456 ' unique_id=77456 and DepthLevel = 1
Bom 77456 2 ' unique_id=77456 and DepthLevel = 2