style="BORDER-LEFT: #000000 2px solid; MARGIN-LEFT: 5px; MARGIN-RIGHT: 0px; PADDING-LEFT: 5px; PADDING-RIGHT: 0px">
"killerxia" <I
href="mailto:killerxia@21cn.com">killerxia@21cn.com> wrote in message
href="news:f0993f1.-1@WebX.maYIadrTaRb">news:f0993f1.-1@WebX.maYIadrTaRb...
want to save some private data in the named object dictionary when the
database is closed. Then I have two questions:
1. Where should I put the codes?
I think the proper
place should be AcDbDatabase::saveAs(), but how do I replace
"AcDbHostApplicationServices()->workingDatabase()" with this overridden
class? In fact, I tried AsdkDataManager::documentToBeDestroyed() created by
the appwizard and OnkUnloadDwgMsg(). But how can I know if the user want to
save the database or just close it without saving any data?
2. In the two function mentioned above, the following code
AcDbDictionary*
pNamedobjDict;
Acad::ErrorStatus es =
acdbHostApplicationServices()->workingDatabase()->getNamedObjectsDictionary(pNamedobjDict,
AcDb::kForWrite)
return
Acad::eWasOpenForRead, then I can not save any data to the dictionary. Even
more, in "OnkUnloadDwgMsg()", CDocData (created by appwizard) is no longer
valid, and the data it kept are inaccessible now.
How can I do?
Anyone help me?
Hello.
I'm trying to define a reactor:
class AcDbMyCustomObjectReactor : public AcDbObject { public: ACRX_DECLARE_MEMBERS(AcDbMyCustomObjectReactor); AcDbMyCustomObjectReactor() {}; void modified(const AcDbObject* dbObj) { ads_printf(_T("123 :: Object was changed.\n")); ads_name objName; ErrorStatus err = acdbGetAdsName(objName, dbObj->objectId()); if (err != eOk) return; if (acdbEntUpd(objName) != RTNORM) return; } };
and I keep getting this error:
1>Insert.obj : error LNK2001: unresolved external symbol "public: virtual class AcRxClass * __thiscall AcDbMyCustomObjectReactor::isA(void)const " (?isA@AcDbMyCustomObjectReactor@@UBEPAVAcRxClass@@XZ)
1>C:\Documents and Settings\Rajica\My Documents\Visual Studio 2005\Projects\CADCircle\Win32\Debug/123Shaft.arx : fatal error LNK1120: 1 unresolved externals
could someone tell me what I might be doing wrong?