Hide Table of Contents
LayerOverride Property (IAnnotation)

Gets or sets whether the annotation has properties that override the default properties of the layer.

.NET Syntax

Visual Basic (Declaration) 
Property LayerOverride As Integer
Visual Basic (Usage) 
Dim instance As IAnnotation
Dim value As Integer
instance.LayerOverride = value
value = instance.LayerOverride
int LayerOverride {get; set;}
property int LayerOverride {
   int get();
   void set (int value);

Return Value

Properties that have been overridden or should be overridden as defined in  swLayerOverride_e (see Remarks)


Layers are currently supported only in SolidWorks drawings.

You should set this property only when you want to reset specific visual properties to the default visual properties of the owning layer. If you want to change or set specific values for the visual property of this item, use IAnnotation::Color, IAnnotation::Style, and IAnnotation::Width.

In drawing documents, annotations can be created on a layer that has specific visual properties. By default, the annotation takes on the visual properties defined by the layer. However, for a specific annotation, you can override these visual properties (color, style, and width).

When the annotation is not on any layer, this property returns an undefined value. You can use the IAnnotation::Layer property to determine the name of the layer that this annotation is on. If an empty string is returned by the Annotation::Layer property, then this property is not used.

When you get this property, the returned bit value indicates which property or properties have been overridden. The bit indicators are:

    • color = 0x1

    • style = 0x2

    • width = 0x4

Therefore, if the value was returned as 3, you know color and style have been specifically set for this item and might not match the default values associated with this item's layer.

When you set this property, the input bit value indicates which property or properties should maintain their current override values. Therefore, if the value is passed as 0x4, we know width should keep its current override value, and that color and style should be reset to use the color and style settings for the item's layer. If you pass 0, all visual properties are reset to use the default settings of the item's layer.

See Also


SolidWorks 99, datecode 1999207

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:   LayerOverride Property (IAnnotation)
*   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) 2012 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.