有高手吗?请教autodskmap objectdata
<div class="t_msgfont" id="postmessage_8145">Dim db As Database = New Database(False, True)<br/> HostApplicationServices.WorkingDatabase = db<br/> db.ReadDwgFile(dwgstr, IO.FileShare.ReadWrite, False, Nothing)<br/> Dim db As Database = HostApplicationServices.WorkingDatabase<br/> Dim trans As Transaction = db.TransactionManager.StartTransaction<br/> Dim ed As Editor = Autodesk.AutoCAD.ApplicationServices.Application.DocumentManager.MdiActiveDocument.Editor<br/> Dim ids As ObjectId()<br/> Dim id As ObjectId<br/><br/>For Each id In ids<br/> Dim mapApp As MapApplication<br/> mapApp = HostMapApplicationServices.Application<br/> Dim activeProject As Project.ProjectModel = mapApp.ActiveProject<br/> Dim tableList As ObjectData.Tables = activeProject.ODTables<br/> Dim records As Records<br/> Dim record As Record<br/> Dim val_1 As MapValue<br/> Dim valInt As Integer = 0<br/> Dim valDouble As Double = 0.0<br/> Dim str As String = Nothing<br/> Dim str_list As String = Nothing<br/> ' For Each record In records<br/> Dim table As ObjectData.Table = tableList("XZQ")<br/> records = table.GetObjectTableRecords(0, id, Constants.OpenMode.OpenForRead, True) <br/><br/>next id<br/><br/>为什么用ReadDwgFile读取的文件使用map函数ObjectData.Table失效</div> 我也很想知道怎么样能通过后台方式提取dwg的对象数据 小狼 发表于 2008-11-27 18:37我也很想知道怎么样能通过后台方式提取dwg的对象数据
后台读取dwg你要用到openfiledialog类选取你要后台读取的文件,然后再用db.ReadDwgFile就能获取全部的id了,我比较在意题主的objectdata是如何定义生成的。
页:
[1]