.NET

Reply
Contributor
sbenedetti
Posts: 14
Registered: ‎01-10-2006
Message 1 of 10 (1,057 Views)

Database.Save and eFileInternalErr

1057 Views, 9 Replies
12-18-2007 04:55 AM
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
Mentor
t.willey
Posts: 2,504
Registered: ‎02-17-2004
Message 2 of 10 (1,057 Views)

Re: Database.Save and eFileInternalErr

12-18-2007 07:54 AM in reply to: sbenedetti
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.
*Luis Esquivel
Message 3 of 10 (1,057 Views)

Re: Database.Save and eFileInternalErr

12-18-2007 08:39 AM in reply to: sbenedetti
/*
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.
Contributor
sbenedetti
Posts: 14
Registered: ‎01-10-2006
Message 4 of 10 (1,057 Views)

Re: Database.Save and eFileInternalErr

12-18-2007 01:24 PM in reply to: sbenedetti
It works!

Thanks to all,
Stefano

Website: http://www.be-st.it
Blog: http://blog.be-st.it
*Tony Tanzillo
Message 5 of 10 (1,057 Views)

Re: Database.Save and eFileInternalErr

12-18-2007 01:27 PM in reply to: sbenedetti
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.
Mentor
t.willey
Posts: 2,504
Registered: ‎02-17-2004
Message 6 of 10 (1,057 Views)

Re: Database.Save and eFileInternalErr

12-18-2007 01:51 PM in reply to: sbenedetti
Thanks Tony. That makes sense.
*Luis Esquivel
Message 7 of 10 (1,057 Views)

Re: Database.Save and eFileInternalErr

12-19-2007 07:21 AM in reply to: sbenedetti
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. <<<=
Mentor
t.willey
Posts: 2,504
Registered: ‎02-17-2004
Message 8 of 10 (1,057 Views)

Re: Database.Save and eFileInternalErr

12-19-2007 08:22 AM in reply to: sbenedetti
Wow!

Now I see another reason why it wouldn't work. Thanks Luis.
*Tony Tanzillo
Message 9 of 10 (1,057 Views)

Re: Database.Save and eFileInternalErr

12-19-2007 11:28 AM in reply to: sbenedetti
Tim - The reason I cited for why you can't use save()
is the reason why save() is not implemented :smileyhappy:

--
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.
Active Contributor
ngarone
Posts: 45
Registered: ‎10-04-2004
Message 10 of 10 (1,057 Views)

Re: Database.Save and eFileInternalErr

01-23-2009 07:12 AM in reply to: sbenedetti
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.

You are not logged in.

Log into access your profile, ask and answer questions, share ideas and more. Haven't signed up yet? Register

Announcements
Are you familiar with the Autodesk Expert Elites? The Expert Elite program is made up of customers that help other customers by sharing knowledge and exemplifying an engaging style of collaboration. To learn more, please visit our Expert Elite website.

Need installation help?

Start with some of our most frequented solutions to get help installing your software.

Ask the Community