谢谢
- Function DrawlineArr()
- Dim Arr(1 To 49)
- ''
- Arr(1) = Array(26, 27)
- Arr(2) = Array(25, 27)
- Arr(3) = Array(24, 26, 28)
- Arr(4) = Array(24, 26, 28)
- Arr(5) = Array(18, 19, 22, 23, 26, 28)
- Arr(6) = Array(18, 19, 22, 23, 26, 28)
- Arr(7) = Array(18, 20, 22, 23, 26, 28)
- Arr(8) = Array(17, 18, 20, 21, 23, 26, 28)
- Arr(9) = Array(16, 18, 20, 21, 23, 26, 28)
- Arr(10) = Array(16, 18, 20, 21, 23, 26, 28)
- Arr(11) = Array(15, 16, 18, 19, 20, 21, 23, 26, 28)
- Arr(12) = Array(15, 16, 18, 19, 20, 21, 23, 26, 28)
- Arr(13) = Array(14, 15, 17, 18, 20, 21, 23, 26, 28)
- Arr(14) = Array(14, 15, 18, 20, 21, 23, 29)
- Arr(15) = Array(14, 15, 17, 18, 20, 21, 24, 27, 29)
- Arr(16) = Array(13, 14, 17, 18, 20, 22, 24, 27, 29)
- Arr(17) = Array(13, 15, 17, 18, 20, 22, 24, 27, 29)
- Arr(18) = Array(13, 16, 17, 18, 20, 22, 24, 27, 29)
- Arr(19) = Array(12, 14, 16, 17, 19, 21, 23, 27, 29)
- Arr(20) = Array(12, 14, 16, 17, 19, 21, 23, 27, 29)
- Arr(21) = Array(12, 15, 16, 18, 19, 21, 27, 29)
- Arr(22) = Array(12, 13, 15, 16, 18, 20, 21, 27, 29, 33, 34, 35)
- Arr(23) = Array(12, 13, 15, 16, 18, 20, 27, 29, 32, 36)
- Arr(24) = Array(11, 12, 15, 17, 19, 21, 26, 28, 31, 34, 36)
- Arr(25) = Array(11, 13, 15, 18, 19, 26, 28, 30, 36, 37)
- Arr(26) = Array(11, 14, 16, 18, 20, 25, 27, 30, 35)
- Arr(27) = Array(12, 14, 16, 19, 24, 26, 29, 34)
- Arr(28) = Array(11, 15, 17, 20, 24, 26, 28, 34)
- Arr(29) = Array(11, 12, 15, 16, 17, 18, 19, 24, 26, 27, 34)
- Arr(30) = Array(11, 15, 18, 23, 26, 34)
- Arr(31) = Array(12, 13, 16, 17, 18, 26, 33)
- Arr(32) = Array(12, 16, 19, 27, 33)
- Arr(33) = Array(13, 14, 17, 18, 19, 20, 33)
- Arr(34) = Array(14, 15, 17, 33)
- Arr(35) = Array(6, 7, 8, 15, 16, 17, 33)
- Arr(36) = Array(5, 6, 9, 10, 16, 33)
- Arr(37) = Array(4, 11, 12, 14, 15, 32)
- Arr(38) = Array(4, 5, 6, 7, 8, 9, 13, 32)
- Arr(39) = Array(3, 32)
- Arr(40) = Array(4, 5, 6, 7, 8, 9, 10, 11, 31)
- Arr(41) = Array(3, 9, 10, 11, 31)
- Arr(42) = Array(2, 5, 6, 7, 8, 10, 30)
- Arr(43) = Array(3, 4, 7, 8, 9, 10, 13, 30)
- Arr(44) = Array(2, 5, 6, 9, 12, 14, 28, 29)
- Arr(45) = Array(3, 4, 8, 11, 15, 16, 17, 18, 27)
- Arr(46) = Array(3, 7, 10, 19, 20, 25, 26)
- Arr(47) = Array(4, 5, 9, 21, 22, 23, 24)
- Arr(48) = Array(5, 7, 8)
- Arr(49) = Array(6)
- DrawlineArr = Arr
- End Function
-
- Sub ll()
- Dim Pres As Presentation
- Set Pres = Application.ActivePresentation
- Dim Sld As Slide, Shp As Shape, Shps As Shapes
- Dim Arr
- Set Shps = Pres.Slides(2).Shapes
- For ii = Shps.Count To 1 Step -1
- Set Shp = Shps(ii)
- Shp.Delete
- Next ii
-
- Arr = DrawlineArr
- For i = 1 To UBound(Arr)
- For j = 0 To UBound(Arr(i))
- Shps.AddLine Arr(i)(j) + 100, i * 1 + 200, Arr(i)(j) + 100 + 0.5, i * 1 + 200 + 0.5
-
- Next
- Next
- Dim PlArr(3, 1)
- For ii = 0 To 3
- PlArr(ii, 0) = Arr(45)(ii * 2)
- PlArr(ii, 1) = Arr(45)(ii * 2 + 1)
- Next ii
- Stop
- Dim pointsArray(1 To 3) As Variant
- pointsArray(1) = Array(100, 100) '第一个顶点坐标
- pointsArray(2) = Array(200, 200) '第二个顶点坐标
- pointsArray(3) = Array(150, 300) '第三个顶点坐标
- Shps.AddPolyline pointsArray
-
- Stop
- End Sub
复制代码 |