.NET
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Database.Save and eFileInternalErr

9 REPLIES 9
Reply
Message 1 of 10
sbenedetti
3952 Views, 9 Replies

Database.Save and eFileInternalErr

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
9 REPLIES 9
Message 2 of 10
t.willey
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.
Message 3 of 10
Anonymous
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.
Message 4 of 10
sbenedetti
in reply to: sbenedetti

It works!

Thanks to all,
Stefano

Website: http://www.be-st.it
Blog: http://blog.be-st.it
Message 5 of 10
Anonymous
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.
Message 6 of 10
t.willey
in reply to: sbenedetti

Thanks Tony. That makes sense.
Message 7 of 10
Anonymous
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. <<<=
Message 8 of 10
t.willey
in reply to: sbenedetti

Wow!

Now I see another reason why it wouldn't work. Thanks Luis.
Message 9 of 10
Anonymous
in reply to: sbenedetti

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.
Message 10 of 10
ngarone
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.

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk DevCon in Munich May 28-29th


Autodesk Design & Make Report

”Boost