TheSwamp
Code Red => .NET => Topic started by: neyton on November 04, 2015, 09:24:13 AM
-
Has anyone tried to open a DWG file using the API of GstarCAD?
See the code below.
It gives error "eNotThatKindOfClass" (error code 63)
<CommandMethod("teste")>
Public Sub teste()
Dim f As New OpenFileDialog
If Not f.ShowDialog Then Exit Sub
Dim dbt As New Database(False, True)
dbt.ReadDwgFile(f.FileName, FileOpenMode.OpenForReadAndReadShare, False, Nothing)
End Sub
-
Hi,
Changes:
dbt.ReadDwgFile(f.FileName, FileOpenMode.OpenForReadAndReadShare, False, Nothing)
to
dbt.ReadDwgFile(f.FileName, FileShare.Read, True, "")
works!!!