Hide Table of Contents
SetHeader Method (ITableAnnotation)

Sets the header for this table.

.NET Syntax

Visual Basic (Declaration) 
Function SetHeader( _
   ByVal Style As System.Integer, _
   ByVal Count As System.Integer _
) As System.Boolean
Visual Basic (Usage) 
Dim instance As ITableAnnotation
Dim Style As System.Integer
Dim Count As System.Integer
Dim value As System.Boolean
value = instance.SetHeader(Style, Count)
System.bool SetHeader( 
   System.int Style,
   System.int Count
System.bool SetHeader( 
&   System.int Style,
&   System.int Count



Header style as defined in swTableHeaderPosition_e

Number of lines in the header

Return Value

True if header is set successfully, false if not


Tables created internally by the SolidWorks software, such as Hole Charts, Revision Blocks, and BOM tables, are created with a specific number of headers lines.

This method cannot:

  • Change the number of lines in the header for these tables; thus, the Count argument is ignored. 
  • Turn off the header in these types of tables; thus, this method has no effect, and FALSE is returned. 

Essentially, the only thing this method can do with these types of tables is to change the header between the top and the bottom.

If you are changing the header style and number of header lines in a single use of this method, the number of lines is considered before changing the header style. For example, if you are changing a table that had 1 header line at the top, by calling SetHeader (swTableHeader_Bottom, 3), the first 3 lines in the table are moved to the bottom of the table.


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:   SetHeader Method (ITableAnnotation)
*   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) 2013 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.