实用坐标提取CAD-EXCEL
实用坐标提取CAD-EXCEL 怎么没有是用说明 <p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt;">第一次使用必须先取消引用*.dll,然后再引用*.dll才能正常调用,使用中要有打开的任一EXCEL文件,A列为空或数字。</p> <p>excel-cad思路</p><p>excel调用cad</p><p>Function ConnectCad() As AcadApplication<br/> Dim App As AcadApplication<br/> On Error Resume Next<br/> Set App = GetObject(, "AutoCad.Application")<br/> If Err Then<br/> Err.Clear<br/> Set App = CreateObject("AutoCad.Application")<br/> End If<br/> App.Visible = True<br/> Set ConnectCad = App<br/>End Function</p><p>坐标提取的思路</p><p></p><p> Dim cadapp As AcadApplication<br/> Set cadapp = ConnectCad<br/> for each ent in cadapp.ActiveDocument.ModelSpace </p><p> dim objLine as AcadEntiti</p><p> If InStr(UCase(Ent.ObjectName), "ACDBLINE") > 0 Then<br/> Set objLine = Ent<br/> With objLine<br/> cells(ii,1)= .StartPoint(0)</p><p> ......<br/> End With<br/> End If</p><p> next ent</p><p></p> <p>下载了,谢谢</p> 下载了,但不会使用!劳请楼主详细说明下! 没有说明啊 感谢分享 <p>很感谢楼主分享,多谢了</p>
页:
[1]