Results 1 to 5 of 5

Thread: AutoCAD .NET Recover API

  1. #1
    Member
    Join Date
    2010-08
    Posts
    3
    Login to Give a bone
    0

    Default AutoCAD .NET Recover API

    Quote Originally Posted by BlackBox View Post
    AutoCAD 2015 introduced the new Recover API, 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?

  2. #2
    Administrator BlackBox's Avatar
    Join Date
    2009-11
    Posts
    5,719
    Login to Give a bone
    0

    Default Re: AutoCAD .NET Recover API

    Quote Originally Posted by zach.258032 View Post
    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.

    Cheers
    Last edited by BlackBox; 2015-08-06 at 05:34 PM. Reason: I can haz a grammar
    "How we think determines what we do, and what we do determines what we get."

    Sincpac C3D ~ Autodesk Exchange Apps

    Computer Specs:
    Dell Precision 3660, Core i9-12900K 5.2GHz, 64GB DDR5 RAM, PCIe 4.0 M.2 SSD (RAID 0), 16GB NVIDIA RTX A4000

  3. #3
    Member
    Join Date
    2010-08
    Posts
    3
    Login to Give a bone
    0

    Default Re: AutoCAD .NET Recover API

    Quote Originally Posted by BlackBox View Post
    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.

    Cheers
    Thanks for the welcome. A new thread sounds great. I'll get my code in order to post.

    Thanks BlackBox.

  4. #4
    Member
    Join Date
    2010-08
    Posts
    3
    Login to Give a bone
    0

    Default Re: AutoCAD .NET Recover API

    Well, I found the answer, and feel a bit foolish.

    I defined the command:
    Code:
    [CommandMethod("RecoverTest")]
    But needed:
    Code:
    [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.
    Last edited by BlackBox; 2015-08-06 at 09:31 PM. Reason: Please use [CODE] Tags

  5. #5
    Administrator BlackBox's Avatar
    Join Date
    2009-11
    Posts
    5,719
    Login to Give a bone
    0

    Default Re: AutoCAD .NET Recover API

    Quote Originally Posted by zach.258032 View Post
    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.



    Quote Originally Posted by zach.258032 View Post
    Well, I found the answer, and feel a bit foolish.

    I defined the command:
    Code:
    [CommandMethod("RecoverTest")]
    But needed:
    Code:
    [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/20...D-F717608F8223


    ... And this page has a handful of useful resources, as well:

    http://usa.autodesk.com/adsk/servlet...&siteID=123112



    Cheers
    "How we think determines what we do, and what we do determines what we get."

    Sincpac C3D ~ Autodesk Exchange Apps

    Computer Specs:
    Dell Precision 3660, Core i9-12900K 5.2GHz, 64GB DDR5 RAM, PCIe 4.0 M.2 SSD (RAID 0), 16GB NVIDIA RTX A4000

Similar Threads

  1. 2014: How To Recover AutoCAD DWG File ?
    By thomashubba19691968 in forum AutoCAD General
    Replies: 3
    Last Post: 2015-02-18, 02:12 PM
  2. Recover a drawing file when the Recover command fails
    By a_meteni in forum AutoCAD General
    Replies: 21
    Last Post: 2014-07-02, 03:34 PM
  3. Recover Why...???
    By CadDog in forum AutoCAD General
    Replies: 5
    Last Post: 2009-06-22, 03:30 PM
  4. Help recover a corrupt DWG in AutoCAD 2006
    By H-Angus in forum AutoCAD General
    Replies: 4
    Last Post: 2007-03-26, 02:11 PM
  5. Cannot Recover drawing - AutoCAD 2005 file
    By CADKitty in forum AutoCAD General
    Replies: 20
    Last Post: 2006-10-03, 01:57 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •