文字导入到EXCEL难道就不能用CAD内部的BLOCK功能导出吗?把文字做成B,然后提取属性,程序的话可以先连接EXCEL啊! 1可以先用选择集选中所有的对象,然后将文字的对像过滤出来 2.得到文字对象后连接EXCEL ,(EXCEL.APPLICATION), 3.EXCEL.workbooks 和excel.sheets 然后用CELLS(X,Y),将文字写入EXCEL表格 public sub sfdsdfsdfs() dim ppppexcel1 as excelapplication dim pppworkbooks as excelwookbooks dim ppworksheet as excelwooksheets set ppppexcel1=getobject(."excel.appliction") if err then set ppppexcel1=createobject("excel.appliction") if err then msgbox err.description end if set pppworkbooks=ppppexcel1.workbooks.add set ppworksheet=pppworkbooks.worksheets.add ppppexcel1.visible=true dim i as double i=0 dim j as double j=0 for each 文字对象 in sset '选择集 ppworksheet.cell(i,j) '写入文字到每一个EXCEL单元格 next 文字对象 end sub |