Hide Table of Contents
InsertBomTable Method (IView)

Inserts a Bill of Materials (BOM) table for this drawing view using Microsoft Excel.

.NET Syntax

Visual Basic (Declaration) 
Function InsertBomTable( _
   ByVal Template As System.String, _
   ByVal Xloc As System.Double, _
   ByVal Yloc As System.Double, _
   ByRef Errors As System.Integer _
) As System.Object
Visual Basic (Usage) 
Dim instance As IView
Dim Template As System.String
Dim Xloc As System.Double
Dim Yloc As System.Double
Dim Errors As System.Integer
Dim value As System.Object
value = instance.InsertBomTable(Template, Xloc, Yloc, Errors)
System.object InsertBomTable( 
   System.string Template,
   System.double Xloc,
   System.double Yloc,
   out System.int Errors
System.Object^ InsertBomTable( 
&   System.String^ Template,
&   System.double Xloc,
&   System.double Yloc,
&   [Out] System.int Errors



File name of the template to use to create this BOM


X coordinate of the location of the BOM


Y coordinate of the location of the BOM


Status of the BOM creation operation as defined in swBOMConfigurationCreationErrors_e

Return Value

BOM table


This method creates a default BOM table at the specified location, using the given template. There are some user preferences that control the default appearance of the table; set them before calling this method to create a BOM that looks like you want it to look. See:

The Template argument is the full path name of the BOM template to use in creating this BOM. If you specify only a file name with no directory, SolidWorks looks for it in install_dir\lang\local language. If the file name is blank, the template uses the bomtemp.xls file in that directory.

The Xloc and Yloc arguments are the (X,Y) drawing location where the BOM is anchored. To get the drawing origin from the drawing view origin, use IView::GetXform or IView::IGetXform. To get the drawing view extents on the drawing, use IView::GetOutline or IView::IGetOutline.

If the BOM creation fails, the Dispatch pointer that is returned is null or nothing. If you want more information about why the operation failed, use the Errors argument. You can pass null or nothing as the Errors argument if you are not interested in the specific information.

NOTE: Use IView::InsertBomTable2 to insert a BOM using SolidWorks table functionality.


See Also


SolidWorks 2001Plus FCS, Revision Number 10.0

Provide feedback on this topic

SOLIDWORKS welcomes your feedback concerning the presentation, accuracy, and thoroughness of the documentation. Use the form below to send your comments and suggestions about this topic directly to our documentation team. The documentation team cannot answer technical support questions. Click here for information about technical support.

* Required

Subject:   Feedback on Help Topics
Page:   InsertBomTable Method (IView)
*   I acknowledge I have read and I hereby accept the privacy policy under which my Personal Data will be used by Dassault Systèmes

Print Topic

Select the scope of content to print:


We have detected you are using a browser version older than Internet Explorer 7. For optimized display, we suggest upgrading your browser to Internet Explorer 7 or newer.

 Never show this message again

Web Help Content Version: API Help (English only) 2014 SP05

To disable Web help from within SOLIDWORKS and use local help instead, click Help > Use SOLIDWORKS Web Help.

To report problems encountered with the Web help interface and search, contact your local support representative. To provide feedback on individual help topics, use the “Feedback on this topic” link on the individual topic page.