Imports ZwSoft.ZwCAD.Runtime
Imports ZwSoft.ZwCAD.Geometry
Imports ZwSoft.ZwCAD.ApplicationServices
Imports ZwSoft.ZwCAD.DatabaseServices
Imports ZwSoft.ZwCAD.GraphicsSystem
Imports ZwSoft.ZwCAD.EditorInput
Public Class ZwApps
<CommandMethod("InsertImage")> _
Public Sub InsertImage()
Dim ZcDoc As Document = Application.DocumentManager.MdiActiveDocument
Dim ZcDb As Database = ZcDoc.Database
Using lockDocument As DocumentLock = ZcDoc.LockDocument
Using ZcTrans As Transaction = ZcDb.TransactionManager.StartTransaction()
Dim dictId As ObjectId = RasterImageDef.GetImageDictionary(ZcDb)
If dictId.IsNull Then
dictId = RasterImageDef.CreateImageDictionary(ZcDb)
End If
Imports ZwSoft.ZwCAD.Geometry
Imports ZwSoft.ZwCAD.ApplicationServices
Imports ZwSoft.ZwCAD.DatabaseServices
Imports ZwSoft.ZwCAD.GraphicsSystem
Imports ZwSoft.ZwCAD.EditorInput
Public Class ZwApps
<CommandMethod("InsertImage")> _
Public Sub InsertImage()
Dim ZcDoc As Document = Application.DocumentManager.MdiActiveDocument
Dim ZcDb As Database = ZcDoc.Database
Using lockDocument As DocumentLock = ZcDoc.LockDocument
Using ZcTrans As Transaction = ZcDb.TransactionManager.StartTransaction()
Dim dictId As ObjectId = RasterImageDef.GetImageDictionary(ZcDb)
If dictId.IsNull Then
dictId = RasterImageDef.CreateImageDictionary(ZcDb)
End If