Database.Save and eFileInternalErr

Database.Save and eFileInternalErr

Anonymous
Not applicable
4,702 Views
9 Replies
Message 1 of 10

Database.Save and eFileInternalErr

Anonymous
Not applicable
Hi, I'm calling this method from AutoCAD 2008 and managed objectarx:

Autodesk.AutoCAD.ApplicationServices.Application.DocumentManager.MdiActiveDocument.Database.Save()

and I get this exception "eFileInternalErr" and dwg doesn't saves.

How can I solve this? I cannot call "_qsave" command because I want to save immediately and continue only if save is successfull.
Thanks
0 Likes
4,703 Views
9 Replies
Replies (9)
Message 2 of 10

Anonymous
Not applicable
I know nothing about ObjectArx, but in other languages you have to use the SaveAs method, and not the Save method. It is a bug in the their code as far as I know.
0 Likes
Message 3 of 10

Anonymous
Not applicable
/*
T.Willey
I know nothing about ObjectArx, but in other languages you have to use the
SaveAs method, and not the Save method. It is a bug in the their code as
far as I know.
*/

Yes, I also never have been able to directly call db.Save();

But, if you call the command SAVE, it works.
0 Likes
Message 4 of 10

Anonymous
Not applicable
It works!

Thanks to all,
Stefano

Website: http://www.be-st.it
Blog: http://blog.be-st.it
0 Likes
Message 5 of 10

Anonymous
Not applicable
Tim - It's not a bug.

You can't save a database to the same file it was read from, because it may not have been completely read in initially, so saving to the same file poses the risk of concurrently reading/writing to the same file.

The SAVE command uses saveAs() to save to a different (e.g., temporary) file and then either deletes or renames the original to *.bak, and then renames the saved file to the original filename.

--
http://www.caddzone.com

AcadXTabs: MDI Document Tabs for AutoCAD 2008
Supporting AutoCAD 2000 through 2008
http://www.acadxtabs.com

wrote in message news:5803866@discussion.autodesk.com...
I know nothing about ObjectArx, but in other languages you have to use the SaveAs method, and not the Save method. It is a bug in the their code as far as I know.
0 Likes
Message 6 of 10

Anonymous
Not applicable
Thanks Tony. That makes sense.
0 Likes
Message 7 of 10

Anonymous
Not applicable
After reading Tony description, I went and read about AcDbDatabase Class in
the ARX help - for the first time.

AcDbDatabase::save Function
Acad::ErrorStatus
save();
Currently not implemented. <<<=
0 Likes
Message 8 of 10

Anonymous
Not applicable
Wow!

Now I see another reason why it wouldn't work. Thanks Luis.
0 Likes
Message 9 of 10

Anonymous
Not applicable
Tim - The reason I cited for why you can't use save()
is the reason why save() is not implemented 🙂

--
http://www.caddzone.com

AcadXTabs: MDI Document Tabs for AutoCAD 2008
Supporting AutoCAD 2000 through 2008
http://www.acadxtabs.com

wrote in message news:5804951@discussion.autodesk.com...
Wow!

Now I see another reason why it wouldn't work. Thanks Luis.
0 Likes
Message 10 of 10

Anonymous
Not applicable
I'm wondering... in this case why return an error "eFileInternalErr"? Something like "eNotImplemented" or "eNotImplementedUseSaveAs" would be clearer.

Anyway, thanks for your answer. It solved for me too.
0 Likes