|
// 函数名 : SetCurTextStyle
// 描述 : 设置当前TextStyle
// 返回 : Acad::ErrorStatus
// 参数 : const char* lpStyleName
// 参数 : AcDbDatabase* pDb/* = NULL */
Acad::ErrorStatus SetCurTextStyle(const char* lpStyleName, AcDbDatabase* pDb/* = NULL */)
{
AcDbDatabase* pCurDb = pDb;
if (pCurDb == NULL)
pCurDb = acdbHostApplicationServices()->workingDatabase();
AcDbTextStyleTableRecordPointer spRecord(lpStyleName, pCurDb, AcDb::kForRead);
Acad::ErrorStatus es = spRecord.openStatus();
if (es == Acad::eOk)
{
es = pCurDb->setTextstyle(spRecord->objectId());
}
return es;
} |
|