高手快来看。
我想画一条线段,如何得到以此线段为对角点的矩形的左下角点? pt1 = ThisDrawing.Utility.GetPoint(, "选取矩形第一角点:")pt2 = ThisDrawing.Utility.GetCorner(pt1, "选取矩形对角点:")
Dim plineObj As AcadLWPolyline
Dim points1(0 To 9) As Double
'轻便多义线各顶点的2d坐标;
points1(0) = pt1(0): points1(1) = pt1(1)
points1(2) = pt2(0): points1(3) = pt1(1)
points1(4) = pt2(0): points1(5) = pt2(1)
points1(6) = pt1(0): points1(7) = pt2(1)
points1(8) = pt1(0): points1(9) = pt1(1)
Set plineObj = ThisDrawing.ModelSpace.AddLightWeightPolyline(points1)
If pt1(0) > pt2(0) Then
pt(0) = pt2(0)
Else
pt(0) = pt1(0)
End If
If pt1(1) > pt2(1) Then
pt(1) = pt2(1)
Else
pt(1) = pt1(1)
End If
a = Abs(pt1(0) - pt2(0))
b = Abs(pt1(1) - pt2(1))
pt = FstPnt
c = Val(ComboBox1.Text)
d = Val(ComboBox2.Text)
TextBox5.Text = pt(0)
<TextBox5.Text 没有数据> wjl???????
页:
[1]