.NET

Reply
Contributor
peteh
Posts: 15
Registered: ‎11-13-2006
Message 1 of 3 (195 Views)
Accepted Solution

Recover Drawing

195 Views, 2 Replies
02-05-2014 06:34 AM

Does anyone have any vb.net code to recover an AutoCAD 2013 drawing?

Hi,

 

At present there is no programmatic way of recovering the drawing files. One method is to create a script file which can recover the drawing file and running the script through the code.

 

Script file could be like

Recover

c:\temp\test.scr

 

VB.net code

<CommandMethod("testrecover", CommandFlags.Session)> _

   Sub testrecover()

       

        Dim scriptPath As String = "c:\\temp\\recover.scr"

        Dim oApp As AcadApplication = Autodesk.AutoCAD.ApplicationServices.Application.AcadApplication

        oApp.ActiveDocument.SendCommand("(command ""script"" """ & scriptPath & """)" & vbCrLf)

    End Sub

ADN Support Specialist
Virupaksha.aithal
Posts: 100
Registered: ‎06-15-2011
Message 2 of 3 (153 Views)

Re: Recover Drawing

02-06-2014 09:44 PM in reply to: peteh

Hi,

 

At present there is no programmatic way of recovering the drawing files. One method is to create a script file which can recover the drawing file and running the script through the code.

 

Script file could be like

Recover

c:\temp\test.scr

 

VB.net code

<CommandMethod("testrecover", CommandFlags.Session)> _

   Sub testrecover()

       

        Dim scriptPath As String = "c:\\temp\\recover.scr"

        Dim oApp As AcadApplication = Autodesk.AutoCAD.ApplicationServices.Application.AcadApplication

        oApp.ActiveDocument.SendCommand("(command ""script"" """ & scriptPath & """)" & vbCrLf)

    End Sub



Virupaksha Aithal KM
Developer Technical Services
Autodesk Developer Network

Contributor
peteh
Posts: 15
Registered: ‎11-13-2006
Message 3 of 3 (141 Views)

Re: Recover Drawing

02-07-2014 05:10 AM in reply to: peteh

 

I can make this work...  thank you.

Post to the Community

Have questions about Autodesk products? Ask the community.

New Post
Need installation help?

Start with some of our most frequented solutions or visit the Installation and Licensing Forum to get help installing your software.