<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Recover files from ObjectARX app in ObjectARX Forum</title>
    <link>https://forums.autodesk.com/t5/objectarx-forum/recover-files-from-objectarx-app/m-p/2120703#M20313</link>
    <description>Hi Owen,&lt;BR /&gt;
&lt;BR /&gt;
I almost got the app running now and everything seem to work, when I set FILEDIA to 0.&lt;BR /&gt;
Last problem is that I get an annoying Autocad Messagebox telling me that Audit accepted recovered database.&lt;BR /&gt;
&lt;BR /&gt;
I tried to send an other message just containing a CR - but that didn't help.&lt;BR /&gt;
&lt;BR /&gt;
Do You have any idea how to get rid of the messagebox?&lt;BR /&gt;
&lt;BR /&gt;
Kind regards&lt;BR /&gt;
Johannes P. Hansen</description>
    <pubDate>Wed, 21 Nov 2007 11:21:54 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2007-11-21T11:21:54Z</dc:date>
    <item>
      <title>Recover files from ObjectARX app</title>
      <link>https://forums.autodesk.com/t5/objectarx-forum/recover-files-from-objectarx-app/m-p/2120698#M20308</link>
      <description>Hi,&lt;BR /&gt;
&lt;BR /&gt;
I want to recover several files from an ObjectARX app.&lt;BR /&gt;
I have studied an earlier topic: http://discussion.autodesk.com/thread.jspa?messageID=5255836&lt;BR /&gt;
which seems to deal with the problem.&lt;BR /&gt;
&lt;BR /&gt;
But compiling the code:&lt;BR /&gt;
// by Fenton Webb, DevTech, Autodesk&lt;BR /&gt;
// my timer proc, this will pump the recover command when Autocad is ready&lt;BR /&gt;
void CALLBACK EXPORT RecoverTimer (HWND hWnd, UINT nMsg, UINT nIDEvent, DWORD dwTime)&lt;BR /&gt;
{&lt;BR /&gt;
	CString cmd = _T("c:\\temp\\test.dwg\n");&lt;BR /&gt;
	// RegisterAPP() ;&lt;BR /&gt;
	COPYDATASTRUCT cmdMsg;&lt;BR /&gt;
	HWND hWndACAD;&lt;BR /&gt;
	hWndACAD = adsw_acadMainWnd();&lt;BR /&gt;
	cmdMsg.dwData = (DWORD)1;&lt;BR /&gt;
	cmdMsg.cbData = (DWORD)_tcslen(cmd) + 1;&lt;BR /&gt;
	cmdMsg.lpData = cmd.GetBuffer(cmd.GetLength()+1); &lt;BR /&gt;
	// Send the message to AutoCAD.&lt;BR /&gt;
	SendMessage(hWndACAD, WM_COPYDATA, (WPARAM)hWndACAD, (LPARAM)&amp;amp;cmdMsg);&lt;BR /&gt;
&lt;BR /&gt;
	acedGetAcadFrame()-&amp;gt;KillTimer(nIDEvent);&lt;BR /&gt;
}&lt;BR /&gt;
&lt;BR /&gt;
void CFileRecovery::OpenDwgFromApplicationContext(void *pData) &lt;BR /&gt;
{&lt;BR /&gt;
	if(acDocManager-&amp;gt;isApplicationContext()) &lt;BR /&gt;
	{&lt;BR /&gt;
		CString *dwgNameToOpen = reinterpret_cast&lt;CSTRING&gt;(pData);&lt;BR /&gt;
		acDocManager-&amp;gt;sendStringToExecute(curDoc(), _T("recover "));&lt;BR /&gt;
		//acDocManager-&amp;gt;appContextOpenDocument(*dwgNameToOpen);&lt;BR /&gt;
		acedGetAcadFrame()-&amp;gt;SetTimer(999, 1000, RecoverTimer);&lt;BR /&gt;
	}&lt;BR /&gt;
	else return;&lt;BR /&gt;
&lt;BR /&gt;
	acDocManager-&amp;gt;setCurDocument(acDocManager-&amp;gt;mdiActiveDocument());&lt;BR /&gt;
}&lt;BR /&gt;
//-----------------------------------------------------------------------------&lt;BR /&gt;
// This is command 'OPENDWGDOC, by Fenton Webb [29/08/2003], DevTech, Autodesk&lt;BR /&gt;
void CFileRecovery::asdkopendwgDoc()&lt;BR /&gt;
{&lt;BR /&gt;
	CString dwgNameToOpen;&lt;BR /&gt;
	dwgNameToOpen = _T("c:\\temp\\test.dwg\n") ;&lt;BR /&gt;
&lt;BR /&gt;
	if(acDocManager-&amp;gt;isApplicationContext())&lt;BR /&gt;
	{&lt;BR /&gt;
		acDocManager-&amp;gt;appContextOpenDocument(dwgNameToOpen);&lt;BR /&gt;
	}&lt;BR /&gt;
	else acDocManager-&amp;gt;executeInApplicationContext(CFileRecovery::OpenDwgFromApplicationContext, &amp;amp;dwgNameToOpen);&lt;BR /&gt;
}&lt;BR /&gt;
&lt;BR /&gt;
Result in the following compiler error:&lt;BR /&gt;
error C3867: 'CFileRecovery::OpenDwgFromApplicationContext': function call missing argument list; use '&amp;amp;CFileRecovery::OpenDwgFromApplicationContext' to create a pointer to member&lt;BR /&gt;
&lt;BR /&gt;
Does anyone have an idea of what I am missing?&lt;BR /&gt;
Thanks&lt;BR /&gt;
Johannes P. Hansen&lt;/CSTRING&gt;</description>
      <pubDate>Tue, 20 Nov 2007 07:47:30 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/objectarx-forum/recover-files-from-objectarx-app/m-p/2120698#M20308</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2007-11-20T07:47:30Z</dc:date>
    </item>
    <item>
      <title>Re: Recover files from ObjectARX app</title>
      <link>https://forums.autodesk.com/t5/objectarx-forum/recover-files-from-objectarx-app/m-p/2120699#M20309</link>
      <description>&amp;gt; Does anyone have an idea of what I am missing?&lt;BR /&gt;
&lt;BR /&gt;
  The error message tells you the problem and how to fix it (add the '&amp;amp;' &lt;BR /&gt;
prefix).  You'll also need to change the two instances of "+ 1" to "+ &lt;BR /&gt;
sizeof(TCHAR)" in the RecoverTimer function. &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;BR /&gt;
-- &lt;BR /&gt;
Owen Wengerd&lt;BR /&gt;
President, ManuSoft &lt;&gt;&lt;BR /&gt;
VP Americas, CADLock, Inc. &lt;&gt;&lt;/&gt;&lt;/&gt;</description>
      <pubDate>Tue, 20 Nov 2007 13:55:42 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/objectarx-forum/recover-files-from-objectarx-app/m-p/2120699#M20309</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2007-11-20T13:55:42Z</dc:date>
    </item>
    <item>
      <title>Re: Recover files from ObjectARX app</title>
      <link>https://forums.autodesk.com/t5/objectarx-forum/recover-files-from-objectarx-app/m-p/2120700#M20310</link>
      <description>Thanks Owen,&lt;BR /&gt;
&lt;BR /&gt;
I tried the "&amp;amp;" one too, but that didn't help much :o((&lt;BR /&gt;
&lt;BR /&gt;
I changed the code to:&lt;BR /&gt;
else acDocManager-&amp;gt;executeInApplicationContext(&amp;amp;CFileRecovery::OpenDwgFromApplicationContext, &amp;amp;dwgNameToOpen);&lt;BR /&gt;
&lt;BR /&gt;
and got the error:&lt;BR /&gt;
&lt;BR /&gt;
error C2664: 'AcApDocManager::executeInApplicationContext' : cannot convert parameter 1 from 'void (__thiscall CFileRecovery::* )(void *)' to 'void (__cdecl *)(void *)'&lt;BR /&gt;
&lt;BR /&gt;
By "You'll also need to change the two instances of "+ 1" to "+ &lt;BR /&gt;
sizeof(TCHAR)" in the RecoverTimer function. " do you mean this:&lt;BR /&gt;
&lt;BR /&gt;
	cmdMsg.cbData = (DWORD)_tcslen(cmd)+ sizeof(TCHAR);&lt;BR /&gt;
	cmdMsg.lpData = cmd.GetBuffer(cmd.GetLength()+ sizeof(TCHAR)); &lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
Kind regards&lt;BR /&gt;
Johannes P. Hansen</description>
      <pubDate>Tue, 20 Nov 2007 16:35:36 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/objectarx-forum/recover-files-from-objectarx-app/m-p/2120700#M20310</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2007-11-20T16:35:36Z</dc:date>
    </item>
    <item>
      <title>Re: Recover files from ObjectARX app</title>
      <link>https://forums.autodesk.com/t5/objectarx-forum/recover-files-from-objectarx-app/m-p/2120701#M20311</link>
      <description>Johannes:&lt;BR /&gt;
&lt;BR /&gt;
&amp;gt; ...cannot convert parameter 1 from 'void (__thiscall &lt;BR /&gt;
&amp;gt; CFileRecovery::* )(void *)'...&lt;BR /&gt;
&lt;BR /&gt;
  CFileRecovery::OpenDwgFromApplicationContext must be declared as a static &lt;BR /&gt;
function, and correct on the "+ 1" bug. &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;BR /&gt;
-- &lt;BR /&gt;
Owen Wengerd&lt;BR /&gt;
President, ManuSoft &lt;&gt;&lt;BR /&gt;
VP Americas, CADLock, Inc. &lt;&gt;&lt;/&gt;&lt;/&gt;</description>
      <pubDate>Tue, 20 Nov 2007 18:00:05 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/objectarx-forum/recover-files-from-objectarx-app/m-p/2120701#M20311</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2007-11-20T18:00:05Z</dc:date>
    </item>
    <item>
      <title>Re: Recover files from ObjectARX app</title>
      <link>https://forums.autodesk.com/t5/objectarx-forum/recover-files-from-objectarx-app/m-p/2120702#M20312</link>
      <description>Thanks again Owen,&lt;BR /&gt;
&lt;BR /&gt;
Great  - I am getting closer :o))&lt;BR /&gt;
I'm able to compile and get the app running.&lt;BR /&gt;
&lt;BR /&gt;
Problem is that the recover dialog box pops up :o((&lt;BR /&gt;
&lt;BR /&gt;
I'm not quite sure if I got corrected the "+1" bug in the right manner.&lt;BR /&gt;
&lt;BR /&gt;
How would you type the code?&lt;BR /&gt;
&lt;BR /&gt;
Kind regards&lt;BR /&gt;
Johannes P. Hansen</description>
      <pubDate>Wed, 21 Nov 2007 08:16:37 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/objectarx-forum/recover-files-from-objectarx-app/m-p/2120702#M20312</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2007-11-21T08:16:37Z</dc:date>
    </item>
    <item>
      <title>Re: Recover files from ObjectARX app</title>
      <link>https://forums.autodesk.com/t5/objectarx-forum/recover-files-from-objectarx-app/m-p/2120703#M20313</link>
      <description>Hi Owen,&lt;BR /&gt;
&lt;BR /&gt;
I almost got the app running now and everything seem to work, when I set FILEDIA to 0.&lt;BR /&gt;
Last problem is that I get an annoying Autocad Messagebox telling me that Audit accepted recovered database.&lt;BR /&gt;
&lt;BR /&gt;
I tried to send an other message just containing a CR - but that didn't help.&lt;BR /&gt;
&lt;BR /&gt;
Do You have any idea how to get rid of the messagebox?&lt;BR /&gt;
&lt;BR /&gt;
Kind regards&lt;BR /&gt;
Johannes P. Hansen</description>
      <pubDate>Wed, 21 Nov 2007 11:21:54 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/objectarx-forum/recover-files-from-objectarx-app/m-p/2120703#M20313</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2007-11-21T11:21:54Z</dc:date>
    </item>
  </channel>
</rss>

