序号数量(nn)nn*22.62117362.04216339.41317362.04416339.41515316.78616339.41715316.78812248.9913271.531012248.91111226.271210203.65139181.0214467.88
这是换热器不管的排版数据,程序如下- Sub ls1()
- Dim App As AcadApplication
- Set App = ConnectCad
- Dim tempArr, tempArray()
- tempArr = Sheet1.Range("c2:c15")
- nn = UBound(tempArr)
- ReDim tempArray(nn)
- For ii = 0 To nn - 1
- tempArray(ii) = tempArr(ii + 1, 1)
- Next ii
- For ii = 0 To nn - 1
- If Abs(tempArray(ii) - tempArray(ii + 1)) = 1 Then
- Sheet1.Cells(ii + 2, 8) = (tempArray(ii) - 1) * 32 / Sqr(2)
- Else
- Sheet1.Cells(ii + 2, 8) = (tempArray(ii) - 1) * 32 / Sqr(2)
- Sheet1.Cells(ii + 2, 9) = (tempArray(ii + 1) - 1) * 32 / Sqr(2)
- End If
- Next ii
- End Sub
|