我感觉是setlineweight函数中的acdb::lineweight枚举类型的原因,谁能帮我改该啊?就是最后的那一句啊!! void zzxchangeLineWid() { #ifdef OARXWIZDEBUG acutPrintf ("\nOARXWIZDEBUG - zzxchangeLineWid() called."); #endif // OARXWIZDEBUG // TODO: Implement the command //open the entity AcDbBlockTable* pBlkTbl; AcDbBlockTableRecord* pBlkTblRed; if (acdbHostApplicationServices()->workingDatabase()->getBlockTable(pBlkTbl, AcDb::kForRead) != Acad::eOk) { acutPrintf(_T("\n connot open the blocktable!")); return; } pBlkTbl->getAt(ACDB_MODEL_SPACE, pBlkTblRed, AcDb::kForRead); pBlkTbl->close(); acutPrintf("111"); //build an Iterator AcDbBlockTableRecordIterator* pItr; pBlkTblRed->newIterator(pItr); //Iterate the Entity for (pItr->start(); !pItr->done(); pItr->step()) { AcDbEntity* pEnt; if (pItr->getEntity(pEnt, AcDb::kForWrite) != Acad::eOk) { acutPrintf(_T("\n connot open the Entity!")); return; } //change the lineweight of Entity AcDb:ineWeight lineweight= pEnt->lineWeight(); lineweight= ???????????????;// who can compelete it ????? if (pEnt->setLineWeight(lineweight) != Acad::eOk) { pEnt->close(); } pEnt->close(); } //delete the Iterator delete pItr; pBlkTblRed->close(); }
|