|
Dim db As Database = New Database(False, True)
HostApplicationServices.WorkingDatabase = db
db.ReadDwgFile(dwgstr, IO.FileShare.ReadWrite, False, Nothing)
Dim db As Database = HostApplicationServices.WorkingDatabase
Dim trans As Transaction = db.TransactionManager.StartTransaction
Dim ed As Editor = Autodesk..ApplicationServices.Application.DocumentManager.MdiActiveDocument.Editor
Dim ids As ObjectId()
Dim id As ObjectId
For Each id In ids
Dim mapApp As MapApplication
mapApp = HostMapApplicationServices.Application
Dim activeProject As Project.ProjectModel = mapApp.ActiveProject
Dim tableList As ObjectData.Tables = activeProject.ODTables
Dim records As Records
Dim record As Record
Dim val_1 As MapValue
Dim valInt As Integer = 0
Dim valDouble As Double = 0.0
Dim str As String = Nothing
Dim str_list As String = Nothing
' For Each record In records
Dim table As ObjectData.Table = tableList("XZQ")
records = table.GetObjectTableRecords(0, id, Constants.OpenMode.OpenForRead, True)
next id
为什么用ReadDwgFile读取的文件使用map函数ObjectData.Table失效 |
|