Hide Table of Contents
InsertBomTable2 Method (IView)

Obsolete. Superseded by IView::InsertBomTable3.

.NET Syntax

Visual Basic (Declaration) 
Function InsertBomTable2( _
   ByVal UseAnchorPoint As System.Boolean, _
   ByVal X As System.Double, _
   ByVal Y As System.Double, _
   ByVal AnchorType As System.Integer, _
   ByVal BomType As System.Integer, _
   ByVal Configuration As System.String, _
   ByVal TableTemplate As System.String _
) As BomTableAnnotation
Visual Basic (Usage) 
Dim instance As IView
Dim UseAnchorPoint As System.Boolean
Dim X As System.Double
Dim Y As System.Double
Dim AnchorType As System.Integer
Dim BomType As System.Integer
Dim Configuration As System.String
Dim TableTemplate As System.String
Dim value As BomTableAnnotation
value = instance.InsertBomTable2(UseAnchorPoint, X, Y, AnchorType, BomType, Configuration, TableTemplate)
BomTableAnnotation InsertBomTable2( 
   System.bool UseAnchorPoint,
   System.double X,
   System.double Y,
   System.int AnchorType,
   System.int BomType,
   System.string Configuration,
   System.string TableTemplate
BomTableAnnotation^ InsertBomTable2( 
&   System.bool UseAnchorPoint,
&   System.double X,
&   System.double Y,
&   System.int AnchorType,
&   System.int BomType,
&   System.String^ Configuration,
&   System.String^ TableTemplate



If true and the appropriate sheet format anchor point exists, then insert table at this point; if false, then use the values specified for the X and Y arguments as the insertion point

X coordinate for the placement of the BOM table
Y coordinate for the placement of the BOM table
Anchor type as defined by swBomConfigurationAnchorType_e
Type of BOM table as defined by swBomType_e
Name of the configuration for this BOM table (see Remarks)

Path and filename of the template that you want to use that corresponds to this type of table (see Remarks)

Return Value

BOM table annotation



If BomType is swBomType_TopLevelOnly, then do not specify Configuration. Instead, use IBomFeature::GetConfigurations or IBomFeature::IGetConfigurations and IBomFeature::SetConfigurations or IBomFeature::ISetConfigurations to work with configurations in BOM tables.

If the drawing was created using a configuration other than the Default configuration, then the configuration active at the time the drawing was created is the configuration used in the BOM table when an empty string is specified for the Configuration parameter.

By default, the BOM table templates are in the install_dir\lang\<language> folder and have a filename extension of .sldbomtbt. The template and table must be of the same type. For example, you could specify C:\Program Files\SOLIDWORKS\lang\English\bom-standard.sldbomtbt for TableTemplate if you wanted to insert an English-version of the standard BOM table template.

If the BOM table is a parts-only or indented-style BOM and the Configuration specified is invalid, then the BOM is not created.

NOTE: Use IView::InsertBomTable or IView::IInsertBomTable to insert a BOM using Microsoft Excel.


See Also


SOLIDWORKS 2004 FCS, Revision Number 12.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:   InsertBomTable2 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) 2017 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.