What to do with a corrupted DWG file? - autocad

I work in AutoCAD 2002. The main file of the drawing when opening AutoCAD gives out "It wasn't succeeded to open this drawing. It contains the incorrect or damaged data". Tried to apply the command to "restore" did not help. Writes that found 3 errors and that all recovered. And opens an empty document as if ctrl+n pressed. Found .the .bak file. when opening it too writes it "It isn't possible to find the specified file of drawing. Be convinced that the specified file exists". and in the folder with the document there is a text acad file (the log of mistakes)
there it is written: FATAL ERROR: Unhandled Access Violation Reading 0x0a2a Exception at 4ad3f5h
02/14/2007 at 09:14:15.204 Drawing: way to the file
that for a problem and what to do??? can eat any else options?. it is very necessary drawing!

I advise you to take this file and to open it in AutoCAD 2005. And try to restore the file with the standard tools of AutoCAD 2005. File -> Utilities -> Recover. After this click SAVE in the 2000 format. And then open it in the working AutoCAD 2002 version. Should help.
Go to this resource and see the theme about DWG files.
https://social.technet.microsoft.com/Forums/en-US/3f956321-2796-49b2-9bd7-6582ad14dd18/drawing-corruptcannot-opencannot-save?forum=itprovistaapps

Related

How do I detect where is corrupted in a power point file?

I have a power point file(.pptx) generated by a program that copies xml files and content files in a slide to other slides. It simply extracts xml files and content files from original power point file and then copies xml files, finally compresses the files as a zip file and renames the file to xxxxx.pptx. (The xml files I mentioned here is, of course, about Office Open XML)
When I open this file in Keynote on Mac OS X, it works well. No error happened.
However when I use PowerPoint application on Mac OS X, the app says "PowerPoint found a problem with content in xxxxx.pptx"
I think there are differences between PowerPoint specs and Keynote specs, so I need to apply the generated pptx file to the PowerPoint specs.
But, the error does not say WHERE or WHAT ERROR IS OCCURRED, but says there are some errors in that file.
So I cannot look for where is damaged in the generated file!
How do I detect the errors in the file or validate the format of it?
I do not want to get 'restore tools' but 'error detection tools'.
I simply used Open XML SDK 2.5 Productivity Tool.
In my situation, it said the Content-Type of xml files was different from expected one when I opened the pptx file. Soon, it occurred to me I forgot to change the data in [Content_Types].xml
After I fixed it, the file is opened without problems now!!
This app also shows codes in C# and validate each xml files individually.
Download Link is here ->
https://www.microsoft.com/en-us/download/details.aspx?id=30425

How to update a PDF document opened in a viewer on Windows

I am writing a cross-platform application which generates PDF documents and then opens them with the standard PDF viewer. On Linux, updating (re-writing) an already opened document is no problem. The PDF viewer (have tried several) updates the displayed document after overwriting the file. I don't even have to trigger anything. This comes in very handy.
On Windows, however, I cannot overwrite a PDF document opened for reading by some viewer, because the viewers seem to open the document exclusively. Of course I cannot change the code of the viewers like Adobe Reader.
Is there any solution to this? I don't want to clutter the directory with arbitrary new file names, but rather use the same file name again. Deleting of the opened file is also forbidden on Windows.
I cannot determine which PDF viewer is used. In order to open the document, I use
cmd.exe /c start <fileName>

Automate a manual process of opening / saving as files

I have a tool which opens .HED files which are some kind of documents created a long time ago..
This type of files is so old and tools opening this extensions are rare. fortunately, I have a tool which opens them. when opened this program gives the choice to open files and saving them as other extensions (.rtf for example )
The problem is: there are about 400 files to be converted from .rtf to .hed and we went to automate this process of opening .rtf file saving it as .hed by some command line.
Is there a way to do so in Windows?
I'm able to open the program by "open 'program_name'" but I'm wondering if it's possible to open all files in folder and saving them as .hed after
Thank you

Exception with Excel SaveCopyAs() method

I have generated a excel report using excel-addins in vs2010 and it saved to desktop. After that I reopened the same file and changed it's data. When I tried to save back with same file name Exception occurs.
Code:-
Globals.ThisAddIn.Application.ActiveWorkbook.SaveCopyAs(saveFileDialog1.FileName);*
Exception:-
System.Runtime.InteropServices.COMException (0x800A03EC): Microsoft Excel cannot access the file 'C:\Documents and Settings\112\Desktop\111.xlsx'. There are several possible reasons:
• The file name or path does not exist.
• The file is being used by another program.
• The workbook you are trying to save has the same name as a currently open workbook.
Check to see that your file isn't being used by something else.
You are almost certainly hitting a file access exception, probably because the document you are attempting to write is already open in another program.
I'm guessing that program is Microsoft Excel.
Close the document in Excel and re-run your test.

Excel .xlsx download - sharing violation error message on Open and Save combination

I've found this question posed a few times, but no definitive answers as yet. Looks like a decent solution would help quite a few people.
So we create an excel file (.xlsx) on the server and download it to the client using content-disposition 'attachment'. The Open Save dialog appears and all works fine if you choose Save, or Open and then Save As... However if you choose Open and then hit the Save... button then Excel hangs for a moment and then presents the message:
Your changes could not be saved to 'Export[5].xlsx' because of a sharing violation. Try saving to a different file.
then:
The file you are trying to open 'F8CAC020.IE5\HM2NBE5C\F8CAC020', is in a different format than specified by the file extension. Verify that the file is not corrupted and is from a trusted source before opening the file. Do you want to open the file now?
then:
you finally get the Save As: dialog (assuming you pressed 'Yes').
Code for creating the file is:
Response.Clear()
Response.ContentType = "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"
Response.AppendHeader("content-disposition", "attachment;filename=Export.xlsx")
Response.AddHeader("Content-Length", New System.IO.FileInfo(NewFile).Length)
Response.TransmitFile(NewFile)
Response.Flush()
If you remove the content-disposition header you get the right sort of behaviour in Excel, but with the wrong name and no guarantee that the Excel document will not instead be shown in the browser (depending on client settings). If you press Open and then Save then you
get a message:
'default.aspx' is read-only. To save a copy, click OK, then give the workbook a new name in the Save As dialog box.
So the question is how to combine the 2 behaviours into a reasonable one:
Get the nice error message directly above, when you try to Open and then Save a downloaded file, but also specify that the document should be downloaded and given a default filename.
Cheers,
James
I believe there is a bug in the IE file download code that does not acknowledge the completed file transfer (download) from the web server, thus leaving a connection to the downloaded (temporary) file open when the save is attempted. That generates the "sharing violation" message. I tried the same code with FireFox and I don't get the same result, which surely leads me to believe this is an IE-specific problem.
Unfortunately, given that I believe this to be a bug in IE, I don't think there is presently a clean resolution to this issue.

Resources