Share

toAcDbTextStyle

C++

Acad::ErrorStatus toAcDbTextStyle(
    AcGiTextStyle&, 
    AcDbObjectId& AcDbStyleId
);

File

acgiutil.h

Description

This function copies the style information in style into an AcDbTextStyleTableRecord and sets AcDbStyleId to the objectId of the AcDbTextStyleTableRecord object to which the information was copied.

The styleName of the AcGiTextStyle "style" will be used as the name of the AcDbTextStyleTableRecord to write to. If the AcGiTextStyle's styleName== NULL, then a random name will be generated and used for the AcDbTextStyle and the AcGiTextStyle's styleName will be set to the random name as well.

If an AcDbTextStyleTableRecord already exists with the name to be used, then it will be opened and the style information will be copied into it.

If no AcDbTextStyleTableRecord exists with the name to be used, then a new AcDbTextStyleTableRecord will be created (and added to acdbCurDwg()) and the style information will be copied into it.

Returns Acad::eOk if successful. Other error values would be the result of an unsuccessful addition of a new AcDbTextStyleTableRecord to the database, or Acad::eOutOfMemory.

Parameters

Parameters Description
AcDbStyleId Returns with the objectId of the AcDbTextStyleTableRecord that was written to
unnamed Input AcGiTextStyle object from which to copy

Was this information helpful?