音乐和啤酒 发表于 2004-5-17 20:25:00

es=pBlockTable->getAt()为什么返回值是eLockViolation

代码如下:



AcGePoint3d startPoint(165.0,137.0,0.0);<BR>                AcGePoint3d endPoint(224.0,216.0,0.0);<BR>                //initiate the instance of the line object<BR>                AcDbLine *pLine=new AcDbLine(startPoint,endPoint);<BR>                if(pLine==NULL)<BR>                {<BR>                        return 0;<BR>                }<BR>                //open the blocktable<BR>                AcDbBlockTable *pBlockTable;<BR>                Acad::ErrorStatus<BR>                        es=acdbHostApplicationServices()-&gt;workingDatabase()<BR>                        -&gt;getSymbolTable(pBlockTable,AcDb::kForRead);<BR>                if(es!=Acad::eOk)<BR>                {<BR>                        delete pLine;<BR>                        return 0;<BR>                }<BR>                //opent the blocktable segment of the model space<BR>                //get the current blocktable record <BR>                //close the blocktable<BR>                AcDbBlockTableRecord *pBlockTableRecord;<BR>                es=pBlockTable-&gt;getAt(ACDB_MODEL_SPACE,<BR>                        pBlockTableRecord,AcDb::kForWrite);



得到的返回值 es为 eLockViolation,该怎么解决啊?



急啊,大侠救我,有些情况下就能得到eOK 的返回值。我是菜鸟!·!·!

页: [1]
查看完整版本: es=pBlockTable->getAt()为什么返回值是eLockViolation