|
<< Click to Display Table of Contents >> Navigation: Programming Mechworks PDM > DBWCommandShell > Commands Reference > BOM > BOM |
Creates the BOM (Bill Of Materials) for the the current selected document and activates the Query page
call DBWShell("Bom [DocUid][DepthLevel]")
DocUid |
Optional. unique id of the document to create the bom of. |
|---|---|
DepthLevel |
Optional. the depth level of the Bom to be created. |
@EXCEL_FILE_PATH |
Excel .XLSX file created by the BOM procedure |
PDM browser must be open even if a unique id is passed.
' 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