数据库反应器函数重载函数
void CDbReactor::objectModified(const AcDbDatabase *dwg, const AcDbObject *dbObj) {
if ( Adesk::kTrue == dbObj->isKindOf(cascoCDeviceDrawing::desc()) ) { cascoCDeviceDrawing *pCEntity = cascoCDeviceDrawing::cast(dbObj);//自定义实体类 if ( pCEntity ) { AcDbObjectId t_pObjectId; t_pObjectId = pCEntity->objectId(); *g_pObjectId = t_pObjectId;
long lObjectId; lObjectId = t_pObjectId.asOldId(); //ObjectID_Update( lObjectId ); } }
}
为什么我在其它地方一旦用到红色的变量所指的全局变量或者蓝色的写到数据库中,其它地方读取该值。当拖动前面插入的自定义实体就会出错? |