.NET

Reply
*Expert Elite*
norman.yuan
Posts: 1,024
Registered: ‎04-27-2009
Message 11 of 13 (259 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.

Moderator
Alexander.Rivilis
Posts: 1,434
Registered: ‎04-09-2008
Message 12 of 13 (258 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
kevin.barnett
Posts: 394
Registered: ‎08-13-2007
Message 13 of 13 (129 Views)

Re: Database.Save "eFileSharingViolation"

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

Have questions about Autodesk products? Ask the community.

New Post
Need installation help?

Start with some of our most frequented solutions or visit the Installation and Licensing Forum to get help installing your software.