- 积分
- 963
- 明经币
- 个
- 注册时间
- 2006-1-21
- 在线时间
- 小时
- 威望
-
- 金钱
- 个
- 贡献
-
- 激情
-
|
在CAD2006中增加数据库反应器后,绘制一个实体,如:line
我此时只做了新增实体的操作,但是CAD命令行却做了很多的反应(贴出一部分),望高人解答啊:
AutoCAD2006:- Event: AcDbDatabaseReactor::objectModified
- ,实体类型:AcDbDimStyleTableRecord,对象句柄:F2,ObjectID:7EF5EF90,图形数据库:7EF5B
- 428
- Entity Count = 0
- Event: AcDbDatabaseReactor::object(Un)Erased
- ,实体类型:AcDbDimStyleTableRecord,对象句柄:F2,ObjectID:7EF5EF90,图形数据库:7EF5B
- 428
- Entity Count = 1
- Event: AcDbDatabaseReactor::objectModified
- ,实体类型:AcDbLinetypeTableRecord,对象句柄:F4,ObjectID:7EF5EFA0,图形数据库:7EF5B
- 428
- Entity Count = 1
- Event: AcDbDatabaseReactor::object(Un)Erased
- ,实体类型:AcDbLinetypeTableRecord,对象句柄:F4,ObjectID:7EF5EFA0,图形数据库:7EF5B
- 428
- Entity Count = 2
- ps:CAD2006中Entity Count 的值也不对,添加一条直线后为5
AUTOCAD2004:
Command: l LINE Specify first point:
Specify next point or [Undo]: Event: AcDbDatabaseReactor::objectAppended
,实体类型:AcDbLine,对象句柄:82,ObjectID:7EF50E90,图形数据库:7EF35C28
Entity Count = 1
Event: AcDbDatabaseReactor::objectModified
,实体类型:AcDbLine,对象句柄:82,ObjectID:7EF50E90,图形数据库:7EF35C28
Entity Count = 1
Event: AcDbDatabaseReactor::objectModified
,实体类型:AcDbBlockTableRecord,对象句柄:1F,ObjectID:7EF50CF8,图形数据库:7EF35C28
Entity Count = 1- PS:在CAD2004中Entity Count值是正确的。
复制代码- //打印Object信息
- void printObj(const AcDbObject* pObj)
- {
- AcDbHandle hObj;
- TCHAR szBuffer[10];
- if (pObj == NULL)
- {
- acutPrintf("(NULL)");
- }
- pObj->getAcDbHandle(hObj);
- hObj.getIntoAsciiBuffer(szBuffer);
- acutPrintf("实体类型:%s,对象句柄:%s,ObjectID:%lx,图形数据库:%lx\n",
- pObj->isA()->name(),szBuffer,pObj->objectId().asOldId(),pObj->database());
- }////
- //打印Event信息
- void printEvent(const AcDbObject* pObj,LPCSTR szEvent)
- {
- acutPrintf(" Event: AcDbDatabaseReactor::%s ,",szEvent);
- }
- void CDBRector::objectAppended(const AcDbDatabase* dwg, const AcDbObject* dbObj)
- {
- printEvent(dbObj,TEXT("objectAppended"));
- printObj(dbObj);
- iEntNum++;
- acutPrintf("Entity Count = %d\n",iEntNum);
- }
- void CDBRector::objectModified(const AcDbDatabase* dwg, const AcDbObject* dbObj)
- {
- printEvent(dbObj,TEXT("objectModified"));
- printObj(dbObj);
- acutPrintf("Entity Count = %d\n",iEntNum);
- }
- void CDBRector::objectErased(const AcDbDatabase* dwg,const AcDbObject* dbObj,Adesk::Boolean bErased)
- {
- if (bErased)
- {
- iEntNum--;
- printEvent(dbObj,TEXT("objectErased"));
- printObj(dbObj);
- }
- else
- {
- iEntNum++;
- printEvent(dbObj,TEXT("object(Un)Erased"));
- printObj(dbObj);
- }
- acutPrintf("Entity Count = %d\n",iEntNum);
- }
复制代码 |
|