NX Open C++ Reference Guide
Public Types | Public Member Functions | List of all members
NXOpen::FontCollection Class Reference

Represents a collection of typographical fonts (for example, Arial, OldEnglish)
To obtain an instance of this class, refer to NXOpen::BasePart

Created in NX3.0.0. More...

Public Types

enum  Type { TypeNx, TypeStandard, TypeEmpty = 10 }
 Specifies the type of font. More...
 

Public Member Functions

int AddFont (const NXString &fontName)
 Adds a font to the part. More...
 
int AddFont (const char *fontName)
 Adds a font to the part. More...
 
int AddFont (const NXString &fontName, NXOpen::FontCollection::Type type)
 Adds a font to the part. More...
 
int AddFont (const char *fontName, NXOpen::FontCollection::Type type)
 Adds a font to the part. More...
 
bool DoesFontExist (int fontIndex)
 Finds out whether the specified ID is associated with a font. More...
 
NXString GetFontName (int fontIndex)
 Returns the name for the font that has the specified integer ID. More...
 
NXOpen::FontCollection::Type GetFontType (int fontIndex)
 Returns the font type of the font at the provided index. More...
 
int GetLength ()
 Returns the number of fonts in the part. More...
 
void ReplaceFont (int fontIndex, NXOpen::FontCollection::Type type, const NXString &fontName)
 Replaces a font name and type at the given font index
Created in NX7.5.0. More...
 
void ReplaceFont (int fontIndex, NXOpen::FontCollection::Type type, const char *fontName)
 Replaces a font name and type at the given font index
Created in NX7.5.0. More...
 
tag_t Tag () const
 Returns the tag of this object. More...
 

Detailed Description

Represents a collection of typographical fonts (for example, Arial, OldEnglish)
To obtain an instance of this class, refer to NXOpen::BasePart

Created in NX3.0.0.


Member Enumeration Documentation

Specifies the type of font.

Enumerator
TypeNx 

NX font.

TypeStandard 

Standard system font.

Member Function Documentation

int NXOpen::FontCollection::AddFont ( const NXString fontName)

Adds a font to the part.

This will only add NX fonts. To add Standard fonts, use the overloaded FontCollection::AddFont routine that accepts the font type. If the font name already exists in the part, this will return the existing font index.

Returns
Integer ID that the method assigns to the font
Created in NX3.0.0.

License requirements : None
Parameters
fontNameFont name
int NXOpen::FontCollection::AddFont ( const char *  fontName)

Adds a font to the part.

This will only add NX fonts. To add Standard fonts, use the overloaded FontCollection::AddFont routine that accepts the font type. If the font name already exists in the part, this will return the existing font index.

Returns
Integer ID that the method assigns to the font
Created in NX3.0.0.

License requirements : None
Parameters
fontNameFont name
int NXOpen::FontCollection::AddFont ( const NXString fontName,
NXOpen::FontCollection::Type  type 
)

Adds a font to the part.

This can be used to create both NX and Standard fonts. If the font name already exists in the part, this will return the existing font index.

Returns
Integer ID that the method assigns to the font
Created in NX7.5.0.

License requirements : None
Parameters
fontNameFont name
typeType of the font
int NXOpen::FontCollection::AddFont ( const char *  fontName,
NXOpen::FontCollection::Type  type 
)

Adds a font to the part.

This can be used to create both NX and Standard fonts. If the font name already exists in the part, this will return the existing font index.

Returns
Integer ID that the method assigns to the font
Created in NX7.5.0.

License requirements : None
Parameters
fontNameFont name
typeType of the font
bool NXOpen::FontCollection::DoesFontExist ( int  fontIndex)

Finds out whether the specified ID is associated with a font.

Returns
True iff the font exists
Created in NX3.0.0.

License requirements : None
Parameters
fontIndexID of the font
NXString NXOpen::FontCollection::GetFontName ( int  fontIndex)

Returns the name for the font that has the specified integer ID.

Returns
The font's name
Created in NX3.0.0.

License requirements : None
Parameters
fontIndexThe ID for the font
NXOpen::FontCollection::Type NXOpen::FontCollection::GetFontType ( int  fontIndex)

Returns the font type of the font at the provided index.

Returns
Type of the font
Created in NX7.5.0.

License requirements : None
Parameters
fontIndexID of the font
int NXOpen::FontCollection::GetLength ( )

Returns the number of fonts in the part.

Returns

Created in NX3.0.0.

License requirements : None
void NXOpen::FontCollection::ReplaceFont ( int  fontIndex,
NXOpen::FontCollection::Type  type,
const NXString fontName 
)

Replaces a font name and type at the given font index
Created in NX7.5.0.



License requirements : None

Parameters
fontIndexID of the font
typeNew type of the font
fontNameNew name of the font
void NXOpen::FontCollection::ReplaceFont ( int  fontIndex,
NXOpen::FontCollection::Type  type,
const char *  fontName 
)

Replaces a font name and type at the given font index
Created in NX7.5.0.



License requirements : None

Parameters
fontIndexID of the font
typeNew type of the font
fontNameNew name of the font
tag_t NXOpen::FontCollection::Tag ( ) const

Returns the tag of this object.


The documentation for this class was generated from the following file:
Copyright 2012 Siemens Product Lifecycle Management Software Inc. All Rights Reserved.