NXOpen .NET Reference Guide  1899
 All Classes Namespaces Functions Variables Enumerations Enumerator Properties
Public Types | Public Member Functions | Properties | List of all members
NXOpen.FontCollection Class Reference

Represents a collection of typographical fonts (for example, Arial, OldEnglish) More...

Inheritance diagram for NXOpen.FontCollection:
NXOpen.Utilities.NXRemotableObject IMessageSink

Public Types

enum  Type { Nx, Standard, Empty = 10 }
 Specifies the type of font More...
 

Public Member Functions

unsafe int AddFont (string fontName)
 Adds a font to the part. More...
 
unsafe int AddFont (string fontName, NXOpen.FontCollection.Type type)
 Adds a font to the part. More...
 
unsafe bool DoesFontExist (int fontIndex)
 Finds out whether the specified ID is associated with a font More...
 
unsafe string GetFontName (int fontIndex)
 Returns the name for the font that has the specified integer ID More...
 
unsafe NXOpen.FontCollection.Type GetFontType (int fontIndex)
 Returns the font type of the font at the provided index More...
 
unsafe int GetLength ()
 Returns the number of fonts in the part More...
 
unsafe void ReplaceFont (int fontIndex, NXOpen.FontCollection.Type type, string fontName)
 Replaces a font name and type at the given font index More...
 
- Public Member Functions inherited from NXOpen.Utilities.NXRemotableObject
IMessageCtrl AsyncProcessMessage (IMessage msg, IMessageSink replySink)
 Asynchronously processes the given message. More...
 
IMessage SyncProcessMessage (IMessage msg)
 Synchronously processes the given message. More...
 

Properties

Tag Tag [get]
 Returns the tag of this object. More...
 
- Properties inherited from NXOpen.Utilities.NXRemotableObject
IMessageSink NextSink [get]
 Gets the next message sink in the sink chain. More...
 

Additional Inherited Members

- Protected Member Functions inherited from NXOpen.Utilities.NXRemotableObject
void initialize ()
 <exclude> 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
Nx 

NX font

Standard 

Standard system font

Empty 

Font doesn't exist

Member Function Documentation

unsafe int NXOpen.FontCollection.AddFont ( string  fontName)
inline

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.

Created in NX3.0.0

License requirements: None.

Parameters
fontNameFont name
Returns
Integer ID that the method assigns to the font
unsafe int NXOpen.FontCollection.AddFont ( string  fontName,
NXOpen.FontCollection.Type  type 
)
inline

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.

Created in NX7.5.0

License requirements: None.

Parameters
fontNameFont name
typeType of the font
Returns
Integer ID that the method assigns to the font
unsafe bool NXOpen.FontCollection.DoesFontExist ( int  fontIndex)
inline

Finds out whether the specified ID is associated with a font

Created in NX3.0.0

License requirements: None.

Parameters
fontIndexID of the font
Returns
True iff the font exists
unsafe string NXOpen.FontCollection.GetFontName ( int  fontIndex)
inline

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

Created in NX3.0.0

License requirements: None.

Parameters
fontIndexThe ID for the font
Returns
The font's name
unsafe NXOpen.FontCollection.Type NXOpen.FontCollection.GetFontType ( int  fontIndex)
inline

Returns the font type of the font at the provided index

Created in NX7.5.0

License requirements: None.

Parameters
fontIndexID of the font
Returns
Type of the font
unsafe int NXOpen.FontCollection.GetLength ( )
inline

Returns the number of fonts in the part

Created in NX3.0.0

License requirements: None.

Returns
unsafe void NXOpen.FontCollection.ReplaceFont ( int  fontIndex,
NXOpen.FontCollection.Type  type,
string  fontName 
)
inline

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

Property Documentation

Tag NXOpen.FontCollection.Tag
get

Returns the tag of this object.


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