How to overwrite block definitions from another file and reflect them on the screen

Asked 2 years ago, Updated 2 years ago, 90 views

In IJCAD 2019, I try to update the existing block definition with the following source and reflect it on the screen, but UpdateAnonymousBlocks() says, "No method or operation is implemented."
AutoCAD 2010 was able to handle the same source without errors, but has the method changed?
Also, I would appreciate it if you could let me know if anyone knows how to implement it by other means.

Dim dwgPath="File Path"
DimlistItemAs SymbolItemClass=DirectCast (SymbolListBox.SelectedItem, SymbolItemClass)
Dimid As ObjectId
DimdbObj As New BlockTableRecord
Using dbA As Database = HostApplicationServices.WorkingDatabase()
    Try
        Using sourceDb As Database = New Database (False, False)
            sourceDb.ReadDwgFile(dwgPath, System.IO.FileShare.Read, False, Nothing)
            id=dbA.Insert(listItem.Name, sourceDb, False)

            DimoTr As Transaction=dbA.TransactionManager.StartTransaction
            dbObj=DirectCast (oTr.GetObject(id, OpenMode.ForRead), BlockTableRecord)
            dbObj.UpdateAnonymousBlocks()
            oTr.Commit()
            oTr.Dispose()
        End Using
    Catch ex As System.Exception
        MsgBox (ex.Message, MsgBoxStyle.Exclusion, "VB.NET Exception")
    End Try
End Using

.net ijcad

2022-09-30 10:28

1 Answers

Based on the content of the error, it seems that the processing of the method is not implemented.
Why don't you contact the manufacturer?


2022-09-30 10:28

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.