ksyr 发表于 2005-4-11 15:38:00

求助:画spline线条出错。

程序代码如下:
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;
}
运行出现如下错误
       
页: [1]
查看完整版本: 求助:画spline线条出错。