*Expert Elite*
Posts: 944
Registered: ‎04-27-2009
Message 11 of 13 (233 Views)

Re: Database.Save "eFileSharingViolation"

04-02-2012 07:02 AM in reply to: Alexander.Rivilis

Well, I'd think how an empty database is created (with noDocument argument being true/false) should not have effect on ReadDwgFile() method being called and the Database being saved as logically. But I could be wrong.


Anyway, I tested with


using (Database db = new Database(false, true))


The result were the same:


Acad2009 32bit: OK;

Acad2011 32bit: getting eFileSharingViolation exception

Acad2012 64bit: getting eFileSharingViolation exception


Since it is very unlikely this would have anything to do with 32/64bit, I'd think this is bug/break in Acad 19.xx (2010/11/12)


Except for OpenFileMode.OpenForreadAndWriteNoShare in ReadDwgFile() method, the other value of FileOpenMode (OpenForReadAndAllShare, OpenForreadAndReadShare and OpenTryForReadShare) seems OK.


So, if I'd avoid to use OpenFileMode.OpenForReadAndWriteNoShare, if I have to read dwg file into database in in the same time do not want the dwg file accessed by others.

Posts: 1,388
Registered: ‎04-09-2008
Message 12 of 13 (232 Views)

Re: Database.Save "eFileSharingViolation"

04-02-2012 07:09 AM in reply to: norman.yuan

norman.yuan wrote:

Since it is very unlikely this would have anything to do with 32/64bit, I'd think this is bug/break in Acad 19.xx (2010/11/12)

A small remark. 19.xx - is AutoCAD 2013 ..., but 18.xx is 2010,2011,2012

Пожалуйста не забывайте про Утвердить в качестве решения! Утвердить в качестве решения и Give Kudos!Баллы
Please remember to Accept Solution! Accept as Solution and Give Kudos!Kudos

Valued Mentor
Posts: 381
Registered: ‎08-13-2007
Message 13 of 13 (102 Views)

Re: Database.Save "eFileSharingViolation"

10-02-2013 11:00 PM in reply to: Hallex
Hallex saved me yet again ... thx for this post...

You are not logged in.

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

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