How to prevent: Open Drawing Errors Found

How to prevent: Open Drawing Errors Found

Anonymous
Not applicable
887 Views
2 Replies
Message 1 of 3

How to prevent: Open Drawing Errors Found

Anonymous
Not applicable

Hello Everyone,

 

I am using c# to systematically go through the vault, download a .dwg, and update a BlockReference via bR.Id.SetAttribute("PARTNUMBER","xxxxxxxx"). The changes are succesfully made and its checked back into the vault, changes are there when I open the file back up and all is well, however, I recieve these two notifications upon openning the drawing and I am curious if we can eliminate one or both of them.

 

The SecondError is more important to be removed than the first. They are labeled first and second simply due to the order that they appear when opening a drawing.

 

I am using Visual Studio 2015, AutoCAD Mechanical 2015, Autodesk Vault Professional R2

Thank you,
cLinville

0 Likes
Accepted solutions (1)
888 Views
2 Replies
Replies (2)
Message 2 of 3

hgasty1001
Advisor
Advisor

Hi,

 

As for the first erros message, you can set a system variable: DWGCHECK, set it to 2, to avoid the anoying message. Also you can also take some action before openning the file checking DwgFileWasSavedByAutodeskSoftware property of the database.

 

As for the second one, i have no idea, may be you can run an audit before saving the file, so the next time the file will be ok.

 

Gaston Nunez

Message 3 of 3

Anonymous
Not applicable
Accepted solution

Hello I found that if I used 

 

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



Instead of using 

using (var dockLock = doc.LockDocument())
                    using (var db = doc.Database)
                    {}

it prevented the second dialog box.

 

Thank you,
cLinville

0 Likes