pan7302 发表于 2008-5-21 20:58:00

Private Sub JoinPoly()请指点

<p>Private Sub JoinPoly()<br/>Dim SSet As AcadSelectionSet<br/>Dim UseElevation As Double<br/>Dim N As Integer<br/>Dim fType(0 To 1) As Integer<br/>Dim fData(0 To 1) As Variant<br/>Dim det As String<br/>fType(0) = 0: fData(0) = "LightWeightPolyline"<br/>fType(1) = 38</p><p>If Not IsNull(ThisDrawing.SelectionSets.Item("JoinPoly")) Then<br/>Set SSet = ThisDrawing.SelectionSets.Item("JoinPoly")<br/>&nbsp;SSet.Delete<br/>End If<br/>Set SSet = ThisDrawing.SelectionSets.Add("JoinPoly")<br/>For N = 0 To 7<br/>&nbsp;&nbsp;&nbsp; SSet.Clear<br/>&nbsp;&nbsp;&nbsp; fData(1) = H(N)<br/>&nbsp;&nbsp;&nbsp; <br/>&nbsp;&nbsp;&nbsp; <strong>SSet.Select acSelectionSetAll, , , fType, fData</strong><br/>&nbsp;&nbsp;&nbsp; det = axSSet2lspEnts(SSet)<br/>&nbsp;&nbsp;&nbsp; SSet.Clear<br/>&nbsp;&nbsp;&nbsp; '使用SendCommand方法完成连接操作<br/>&nbsp;&nbsp;&nbsp; ThisDrawing.SendCommand "_PEDIT" &amp; vbCr &amp; "M" &amp; vbCr &amp; det &amp; vbCr &amp; vbCr &amp; "J" &amp; vbCr &amp; "0.001" &amp; vbCr &amp; vbCr</p><p>Next N</p><p><br/>End Sub</p><p></p><p></p><p>&nbsp;<strong>SSet.Select acSelectionSetAll, , , fType, fData提示出错,不知是什么原因?</strong></p><p><strong></strong><br/></p>
页: [1]
查看完整版本: Private Sub JoinPoly()请指点