如如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 我在图纸上画有不同高程上多义线,想选择特定高程上的线图。H(I)为模块级Private double SSet.Select acSelectionSetAll, , , fType, fData提示出错,不知是什么原因?
请高手指点 fType(1) = 38 的用法是否有错?
|