作业,把vba代码封成dll实在搞不会
就这样把确定里的那些封装到dll并引用
Dim pt1(0 To 2) As Double
Dim pt2(0 To 2) As Double
Dim pt3(0 To 2) As Double
Dim pt4(0 To 2) As Double
Dim pt5(0 To 2) As Double
Dim pt6(0 To 2) As Double
Dim pt7(0 To 2) As Double
Dim pt8(0 To 2) As Double
Dim pt9(0 To 2) As Double
Dim pt10(0 To 2) As Double
Dim pt11(0 To 2) As Double
Dim pt12(0 To 2) As Double
Dim pt13(0 To 2) As Double
Dim pt14(0 To 2) As Double
l = TextBox1.Text
w = TextBox2.Text
d = TextBox3.Text
d1 = TextBox4.Text
d2 = TextBox5.Text
d3 = TextBox10.Text
x1 = TextBox16.Text
y1 = TextBox17.Text
pt1(0) = 1 * d2 + 1 * d + 0.5 * l
pt1(1) = 0
pt1(2) = 0
pt2(0) = 1 * d2 + 1 * d + 1 * x1
pt2(1) = 0
pt2(2) = 0
pt3(0) = 1 * d2 + 1 * d + 1 * x1
pt3(1) = 1 * d3 + 1 * d1 + 1 * y1
pt3(2) = 0
pt4(0) = 0
pt4(1) = 1 * d3 + 1 * d1 + 1 * y1
pt4(2) = 0
pt5(0) = 0
pt5(1) = 1 * d3 + 1 * d1 + 0.5 * w
pt5(2) = 0
ThisDrawing.ModelSpace.AddLine pt1, pt2
ThisDrawing.ModelSpace.AddLine pt2, pt3
ThisDrawing.ModelSpace.AddLine pt3, pt4
ThisDrawing.ModelSpace.AddLine pt4, pt5pt6(0) = 1 * d2 + 1 * d + 1 * x1
pt6(1) = 1 * d3
pt6(2) = 0
pt7(0) = 1 * d2 + 1 * x1
pt7(1) = 1 * d3 + 1 * d1 + 1 * y1
pt7(2) = 0
pt8(0) = 1 * d2 + 1 * x1
pt8(1) = 1 * d3 + 1 * d1 + 1 * y1 + 0.5 * w
pt8(2) = 0
pt9(0) = 1 * d2 + 1 * d + 1 * x1
pt9(1) = 1 * d3 + 1 * d1 + 1 * y1 + 0.5 * w
pt9(2) = 0
pt10(0) = 1 * d2 + 1 * d + 0.5 * l
pt10(1) = 1 * d3 + 1 * d1 + 1 * y1
pt10(2) = 0
pt11(0) = 1 * d2 + 1 * d + 0.5 * l
pt11(1) = 1 * d3
pt11(2) = 0
。。。。 求大神教导,留下qq,有偿也行
页:
[1]