Hide Table of Contents
IGetTextFormat Method (IAnnotation)

Gets the text format for the specified text in this annotation.

.NET Syntax

Visual Basic (Declaration) 
Function IGetTextFormat( _
   ByVal Index As System.Integer _
) As TextFormat
Visual Basic (Usage) 
Dim instance As IAnnotation
Dim Index As System.Integer
Dim value As TextFormat
 
value = instance.IGetTextFormat(Index)
C# 
TextFormat IGetTextFormat( 
   System.int Index
)
C++/CLI 
TextFormat^ IGetTextFormat( 
&   System.int Index
) 

Parameters

Index

Number indicating which text within this annotation to check

Return Value

ITextFormat of the specified piece of text

Remarks

The behavior of this method differs depending on the type of annotation.

  • Datum Target and Datum Feature Symbols

    These symbols always use the document default setting for dimension text format to
    display text within the symbol. The index argument is not used and should be set
    to 0.
  • Geometric Tolerance, Display Dimensions, Simple Notes, Surface Finish, and Weld Symbols

    These symbols can either use the document default setting to display text within
    the symbol (dimension text setting for the geometric tolerance symbols and display
    dimensions, or note text setting for notes) or they can use a local format. The index
    argument is not used and should be set to 0.
  • Blocks and Compound Notes

    These symbols might contain several different pieces of text; each piece can use
    the document default setting for notes or a local format. The index argument identifies
    the text. The index value is 0-based. If the index value is invalid, then this method
    returns a NULL pointer. To get the number of text or ITextFormat objects, use IAnnotation::GetTextFormatCount.
  • Rich Text Format

    If a note contains embedded rich text information in the string, this method returns
    a text format that does not necessarily reflect what is displayed on the screen for
    that note. Use INote::HasMultipleFonts to determine if the note contains embedded
    rich text information.


ITextFormat is returned if it is for a local setting or for the document
default setting. To determine whether or not this annotation is using the document
default settings for text format, use IAnnotation::GetUseDocTextFormat. To set the
text format information, use IAnnotation::SetTextFormat.

 

See Also

Availability

SolidWorks 2000 FCS, Revision Number 8.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:   IGetTextFormat Method (IAnnotation)
*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) 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.