- 积分
- 24557
- 明经币
- 个
- 注册时间
- 2004-3-17
- 在线时间
- 小时
- 威望
-
- 金钱
- 个
- 贡献
-
- 激情
-
|
发表于 2005-6-6 20:27:00
|
显示全部楼层
Dim ln1, ln2, ln3, ln4 As AcadLine
VB里没有这种写法,如果这么写表示ln1, ln2, ln3是变体,ln4 是AcadLine
Public Sub Testline() Dim d1 As Double, d3 As Double, R1 As Double Dim p1(2) As Double Dim p2, p3, p4, p5 Dim ln1 As AcadLine, ln2 As AcadLine, ln3 As AcadLine, ln4 As AcadLine d1 = 15 R1 = 9 d3 = 4.1 p1(0) = 100: p1(1) = 100: p1(2) = 0 p2 = getpoint(p1, 0#, d1 / 2) p3 = getpoint(p1, 0#, R1 - 0.5 - d3 / 2) p4 = getpoint(p3, 0.5, 0.5) p5 = getpoint(p4, 0#, d3) Set ln1 = ThisDrawing.ModelSpace.AddLine(p1, p2) Set ln2 = ThisDrawing.ModelSpace.AddLine(p2, p3) Set ln3 = ThisDrawing.ModelSpace.AddLine(p3, p4) Set ln4 = ThisDrawing.ModelSpace.AddLine(p4, p5) End Sub |
|