本帖最后由 作者 于 2008-7-9 18:26:51 编辑
出现内存错误!!!!!!!!为什么老是出现这个问题???? // ObjectARX defined commands, created by [2008-7-9], , #include "StdAfx.h" #include "StdArx.h" #include "geassign.h" //----------------------------------------------------------------------------- // This is command 'CREATETEXT, by [2008-7-9], , void zzxcreateText() { #ifdef OARXWIZDEBUG acutPrintf ("\nOARXWIZDEBUG - zzxcreateText() called."); #endif // OARXWIZDEBUG // TODO: Implement the command ads_point ptOrigion; char string[100]; AcDbObjectId objId; acedGetPoint(NULL,"please insert the point:",ptOrigion); acedGetString(1,"please input the contend:",string); AcDbText* pText = new AcDbText(asPnt3d(ptOrigion),string); AcDbBlockTable* pBlkTbl; acdbHostApplicationServices()->workingDatabase()->getSymbolTable(pBlkTbl,AcDb::kForRead); AcDbBlockTableRecord* pBlkTblRecord; pBlkTbl->getAt(ACDB_MODEL_SPACE,pBlkTblRecord,AcDb::kForWrite); pBlkTblRecord->appendAcDbEntity(objId,pText); pBlkTbl->close(); pBlkTblRecord->close(); }
|