cqy 发表于 2009-7-27 19:07:00

实用坐标提取CAD-EXCEL

实用坐标提取CAD-EXCEL

xianglongg 发表于 2009-8-6 19:24:00

怎么没有是用说明

cqy 发表于 2009-8-6 21:07:00

<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt;">第一次使用必须先取消引用*.dll,然后再引用*.dll才能正常调用,使用中要有打开的任一EXCEL文件,A列为空或数字。</p>

兰州人 发表于 2009-8-12 12:34:00

<p>excel-cad思路</p><p>excel调用cad</p><p>Function ConnectCad() As AcadApplication<br/>&nbsp; Dim App As AcadApplication<br/>&nbsp; On Error Resume Next<br/>&nbsp; Set App = GetObject(, "AutoCad.Application")<br/>&nbsp; If Err Then<br/>&nbsp;&nbsp;&nbsp; Err.Clear<br/>&nbsp;&nbsp;&nbsp; Set App = CreateObject("AutoCad.Application")<br/>&nbsp; End If<br/>&nbsp; App.Visible = True<br/>&nbsp; Set ConnectCad = App<br/>End Function</p><p>坐标提取的思路</p><p></p><p>&nbsp; Dim cadapp As AcadApplication<br/>&nbsp; Set cadapp = ConnectCad<br/>&nbsp; for each &nbsp;ent in cadapp.ActiveDocument.ModelSpace&nbsp; </p><p>&nbsp;&nbsp;&nbsp;&nbsp; dim objLine as AcadEntiti</p><p>&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; If InStr(UCase(Ent.ObjectName), "ACDBLINE") &gt; 0 Then<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Set objLine = Ent<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; With objLine<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; cells(ii,1)= .StartPoint(0)</p><p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;......<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; End With<br/>&nbsp;&nbsp;&nbsp;&nbsp; End If</p><p>&nbsp; next ent</p><p></p>

jinshaoyan 发表于 2009-8-25 23:14:00

<p>下载了,谢谢</p>

boboyhb 发表于 2009-9-23 12:40:00

下载了,但不会使用!劳请楼主详细说明下!

神影独龙 发表于 2009-9-28 20:27:00

没有说明啊

blackfire 发表于 2009-10-6 11:13:00

感谢分享

xiaowen 发表于 2010-6-9 17:05:00

<p>很感谢楼主分享,多谢了</p>
页: [1]
查看完整版本: 实用坐标提取CAD-EXCEL