![]() |
【转帖】drawing dimensions exported to excel or text file
drawing dimensions exported to excel or text file
anyone have an existing macro or code i could use to accomplish this? also, is there any way to get the gd&t associated with each dimension as well? thanks, don option explicit sub main() dim swapp as sldworks.sldworks dim swmodel as sldworks.modeldoc2 dim swdraw as sldworks.drawingdoc dim swview as sldworks.view dim swdispdim as sldworks.displaydimension dim swdim as sldworks.dimension dim swann as sldworks.annotation dim oxl as excel.application dim owb as excel.workbook dim ows as excel.worksheet set oxl = new excel.application set owb = oxl.workbooks.add set ows = owb.worksheets(1) dim lrow as long set swapp = application.sldworks set swmodel = swapp.activedoc set swdraw = swmodel set swview = swdraw.getfirstview do while not swview is nothing set swdispdim = swview.getfirstdisplaydimension5 do while not swdispdim is nothing set swann = swdispdim.getannotation set swdim = swdispdim.getdimension lrow = lrow + 1 ows.cells(lrow, 1).value = swview.name ows.cells(lrow, 2).value = swann.getname ows.cells(lrow, 3).value = swdim.fullname ows.cells(lrow, 4).value = swdim.name ows.cells(lrow, 5).value = swdim.getsystemvalue2("") set swdispdim = swdispdim.getnext3 loop set swview = swview.getnextview loop oxl.visible = true end sub do'n forget add reference to microsoft excel quick |
所有的时间均为北京时间。 现在的时间是 05:14 PM. |