Private Sub JoinPoly() Dim SSet As AcadSelectionSet Dim UseElevation As Double Dim N As Integer Dim fType(0 To 1) As Integer Dim fData(0 To 1) As Variant Dim det As String fType(0) = 0: fData(0) = "LightWeightPolyline" fType(1) = 38 If Not IsNull(ThisDrawing.SelectionSets.Item("JoinPoly")) Then Set SSet = ThisDrawing.SelectionSets.Item("JoinPoly") SSet.Delete End If Set SSet = ThisDrawing.SelectionSets.Add("JoinPoly") For N = 0 To 7 SSet.Clear fData(1) = H(N) SSet.Select acSelectionSetAll, , , fType, fData det = axSSet2lspEnts(SSet) SSet.Clear '使用SendCommand方法完成连接操作 ThisDrawing.SendCommand "_PEDIT" & vbCr & "M" & vbCr & det & vbCr & vbCr & "J" & vbCr & "0.001" & vbCr & vbCr Next N End Sub
SSet.Select acSelectionSetAll, , , fType, fData提示出错,不知是什么原因?
|