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 String, _
   ByVal Xloc As Double, _
   ByVal Yloc As Double, _
   ByRef Errors As Integer _
) As Object
Visual Basic (Usage) 
Dim instance As IView
Dim Template As String
Dim Xloc As Double
Dim Yloc As Double
Dim Errors As Integer
Dim value As Object
 
value = instance.InsertBomTable(Template, Xloc, Yloc, Errors)
C# 
object InsertBomTable( 
   string Template,
   double Xloc,
   double Yloc,
   out int Errors
)
C++/CLI 
Object^ InsertBomTable( 
&   String^ Template,
&   double Xloc,
&   double Yloc,
&   [Out] int Errors
) 

Parameters

Template

File name of the template to use to create this BOM

Xloc

X coordinate of the location of the BOM

Yloc

Y coordinate of the location of the BOM

Errors

Status of the BOM creation operation as defined in swBOMConfigurationCreationErrors_e

Return Value

BOM table

Remarks

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 API to create a BOM that looks like you want it to. 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 the SolidWorks installation directory under \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 will be anchored. To get the drawing origin from the drawing view origin, refer to 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 will be NULL. If you want more information about why the operation failed, use the Errors argument. You can pass in NULL 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

Availability

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

 
*Email:  
Subject:   Feedback on Help Topics
Page:   InsertBomTable Method (IView)
*Comment:  
*   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:



x

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
x

Web Help Content Version: API Help (English only) 2010 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.