帮解决下问题,不甚感激
<p><font color="#ff0000">程序的目的是希望分解每个图元后,将其再重新还原到原层</font></p><p><font color="#ff0000">问题一:我想调用最下边这个explodere是否正确</font></p><p><font color="#ff0000">问题二;和昨天问的一样,怎么解决图元分解为题(不是块)element.explode不行用什么其他的方法正确</font></p><p><font color="#ff0000">刚开始学vb,用vba做东ix,这个是我写的程序,有很多问题,希望高手解决下,不甚感激</font></p><p>Private Sub explode()<br/>On Error Resume Next<br/>Dim sset As AcadSelectionSet<br/>If Not IsNull(ThisDrawing.SelectionSets.Item("all")) Then<br/> Set sset = ThisDrawing.SelectionSets.Item("all")<br/> sset.Delete<br/>End If<br/>Set sset = ThisDrawing.SelectionSets.Add("all")<br/>Dim filtertype(0 To 8) As Integer<br/>Dim filterdata(0 To 8) As Variant<br/>filtertype(0) = 8: filterdata(0) = "AERTAL"<br/>filtertype(1) = 8: filterdata(1) = "BURIED"<br/>filtertype(2) = 8: filterdata(2) = "HICAP"<br/>filtertype(3) = 8: filterdata(3) = "KANDBASE"<br/>filtertype(4) = 8: filterdata(4) = "NOTE"<br/>filtertype(5) = 8: filterdata(5) = "SYSTEM"<br/>filtertype(6) = 8: filterdata(6) = "TELCO_BOUNDARY"<br/>filtertype(7) = 8: filterdata(7) = "TERMINAL"<br/>filtertype(8) = 8: filterdata(8) = "BORDERSTAMP"<br/>sset.Select acSelectionSetAll, , , filtertype, filterdata<br/>Dim element As AcadEntity<br/>Dim layername As Variant<br/>For Each element In sset<br/> layername = element.Layer<br/> Select Case layername<br/> Case "AERTAL"<br/> <font color="#ff0000">Call explodere(element)</font><br/> Case "BURIED"<br/> <font color="#ff0000">Call explodere(element)</font></p><p><font color="#ff0000"> </font> Case "HICAP"<br/> <font color="#ff0000">Call explodere(element)</font><br/> Case "KANDBASE"<br/> <font color="#ff0000">Call explodere(element)</font></p><p> Case "NOTE"<br/> <font color="#ff0000">Call explodere(element)</font><br/> Case "SYSTEM"<br/> <font color="#ff0000">Call explodere(element)</font><br/> Case "TELCO_BOUNDARY"<br/> <font color="#ff0000">Call explodere(element)</font><br/> Case "TERMINAL"<br/> <font color="#ff0000">Call explodere(element)</font><br/> Case "BORDERSTAMP"<br/> <font color="#ff0000">Call explodere(element)</font><br/> End Select<br/>Next<br/>sset.Delete<br/>End Sub<br/></p><p><font color="#ff0000">//希望分步执行的时候调用他</font></p><p>Private Sub explodere(element)<br/>'分解该元素<br/>element.explode<br/>'将层反回<br/>element.Layer = layername<br/>End Sub<br/></p><p>程序的目的是希望分解每个图元后,将其再重新还原到原层</p><p>问题一:我想调用最下边这个explodere是否正确</p><p>问题二;和昨天问的一样,怎么解决图元分解为题(不是块)element.explode不行用什么其他的方法正确</p>
页:
[1]