Message 1 of 2
eLockViolation while using ReadDwgFile on database object
Not applicable
02-07-2011
06:38 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I used the code below last night on files local to the computer, and everything worked fine. This morning, i tried it and network files and it throws an error on the ReadDwgFile line saying "Cannot convert eLockViolation to integer". I then tried it on local files as well, and I also get this error. Any help would be appreciated.
Public Shared Sub BatchBlock(ByVal fileName As String, ByVal blockName As String, ByVal reportFile As String)
If Not System.IO.File.Exists(fileName) Then
Return
End If
Dim db As New Database(False, False)
Try
db.ReadDwgFile(fileName, System.IO.FileShare.ReadWrite, True, "")
Catch ex As Exception
db.Dispose()
Throw New Exception(CType(ex.Message, ErrorStatus))
End Try