只是直线吧! private sub ppcountline() dim pppt1 as variant dim pppt2 as acadentity dim pppsetpp as acadselectionset if pppsetpp.count>0 then pppsetpp.delete end if else pppset=ppthisdrawing.selectionsets.add("line11") pppset.selectonscreen dim j as double j=0 dim aaa as acadentity dim bbb as acadline for each aaa in pppset if aaa.objectname="acadline" then set bbb=aaa j=j+aaa.length msgbox "total line length:" & j end sub |