Announcements
Due to scheduled maintenance, the Autodesk Community will be inaccessible from 10:00PM PDT on Oct 16th for approximately 1 hour. We appreciate your patience during this time.
.NET
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

How to prevent: Open Drawing Errors Found

2 REPLIES 2
SOLVED
Reply
Message 1 of 3
Anonymous
676 Views, 2 Replies

How to prevent: Open Drawing Errors Found

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

2 REPLIES 2
Message 2 of 3
hgasty1001
in reply to: Anonymous

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
in reply to: hgasty1001

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

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

Post to forums  

AutoCAD Inside the Factory


Autodesk Design & Make Report