|
程序代码如下:
void CreateSpline()
{
AcGePoint3d point(0,0,0);
AcGePoint3dArray asd;
AcDbObjectId splineId;
AcDbBlockTableRecord *pBlockTableRecord;
AcDbBlockTable *pBlockTable;
asd.append(point);
point.set(10,10,0);
asd.append(point);
point.set(20,-2,0);
asd.append(point);
point.set(30,5,0);
asd.append(point);
AcDbSpline *pSpline=new AcDbSpline(asd,4,0.0);
Adesk::Boolean x=pSpline->isNull();
acdbHostApplicationServices()->workingDatabase()->getSymbolTable(pBlockTable,AcDb::kForWrite);
pBlockTable->getAt(ACDB_MODEL_SPACE,pBlockTableRecord,AcDb::kForWrite);
Acad::ErrorStatus test=pBlockTableRecord->appendAcDbEntity(splineId,pSpline);
pBlockTable->close();
pBlockTableRecord->close();
pSpline->close();
delete pSpline;
}
运行出现如下错误
3uqohwiqgfh.jpg
|
|