View Full Version : AutoCAD .NET Recover API
ssatellite
2015-08-06, 04:57 PM
AutoCAD 2015 introduced the new Recover API (http://adndevblog.typepad.com/autocad/2014/03/recover-api-new-api-in-autocad-2015-1.html), which means that drawings can be recovered without being opened in the Editor (i.e., much, much faster).
I followed through the code you linked to and can't get it to work. Seems like AppContextRecoverDocument() wont take any of the paths I give it to DWG files.
Has anyone gotten the new Recover API to work?
BlackBox
2015-08-06, 05:33 PM
I followed through the code you linked to and can't get it to work. Seems like AppContextRecoverDocument() wont take any of the paths I give it to DWG files.
Has anyone gotten the new Recover API to work?
Firstly, welcome to AUGI.
In reverse order....
I have not yet found the need to develop an app using the new Recover API.
Without seeing your code, and knowing what framework(s), and version(s) you're compiling for, etc. I have no way of identifying the issue you're experiencing as I have no context on which to even speculate. I see you've commented at the bottom of the DevBlog article as well, so perhaps Viru will be better suited to know the 'why' without such information.
That said, if you'd like, I can move your post (and mine) to a new thread in the .NET forum, where you can post your source code, etc. and we can continue this discussion; let me know. :beer:
Cheers
ssatellite
2015-08-06, 05:42 PM
Firstly, welcome to AUGI.
In reverse order....
I have not yet found the need to develop an app using the new Recover API.
Without seeing your code, and knowing what framework(s), and version(s) you're compiling for, etc. I have no way of identifying the issue you're experiencing as I have no context on which to even speculate. I see you've commented at the bottom of the DevBlog article as well, so perhaps Viru will be better suited to know the 'why' without such information.
That said, if you'd like, I can move your post (and mine) to a new thread in the .NET forum, where you can post your source code, etc. and we can continue this discussion; let me know. :beer:
Cheers
Thanks for the welcome. A new thread sounds great. I'll get my code in order to post.
Thanks BlackBox.
ssatellite
2015-08-06, 06:00 PM
Well, I found the answer, and feel a bit foolish.
I defined the command:
[CommandMethod("RecoverTest")]
But needed:
[CommandMethod("RecoverTest", CommandFlags.Session)]
I'm not sure what CommandFlags.Session does, but it appears to be quite necessary for the Recover API to run. Again thanks for the help. Hopefully my oversight will help someone else.
BlackBox
2015-08-06, 09:35 PM
Thanks for the welcome. A new thread sounds great. I'll get my code in order to post.
Thanks BlackBox.
Posts moved to new thread, as discussed. :beer:
Well, I found the answer, and feel a bit foolish.
I defined the command:
[CommandMethod("RecoverTest")]
But needed:
[CommandMethod("RecoverTest", CommandFlags.Session)]
I'm not sure what CommandFlags.Session does, but it appears to be quite necessary for the Recover API to run. Again thanks for the help. Hopefully my oversight will help someone else.
No worries; this might help you to better understand Commands in .NET API:
http://help.autodesk.com/view/ACD/2016/ENU/?guid=GUID-F77E8FE0-8034-4704-93BD-F717608F8223
... And this page has a handful of useful resources, as well:
http://usa.autodesk.com/adsk/servlet/index?id=1911627&siteID=123112
Cheers
Powered by vBulletin® Version 4.2.5 Copyright © 2025 vBulletin Solutions Inc. All rights reserved.