- UID
- 485771
- 积分
- 20
- 精华
- 贡献
-
- 威望
-
- 活跃度
-
- D豆
-
- 在线时间
- 小时
- 注册时间
- 2006-9-3
- 最后登录
- 1970-1-1
|
马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。
您需要 登录 才可以下载或查看,没有账号?立即注册
×
是这样的。'=====================================================================================================Call Example_InsertBlock(a)'a 是不定字符变量,根据要求建立不同的块名。for i=1 to n'n值会在程序的其它地方给定此处未知 Call Example_Addline(x1,y1,x2,y2)'有关参数值的程序已被略掉 Call Example_AddCircle(x,y,r)
Next i'==============我是想把以上部分画的图元加入到未知变量“a”的块中======================================== Sub Example_AddLine(x1 as double,y1 as double,x2 as double,y2 as double)
Dim lineObj As AcadLine Dim startPoint(0 To 2) As Double Dim endPoint(0 To 2) As Double
startPoint(0) = x1: startPoint(1) = y1: startPoint(2) = 0# endPoint(0) = x2: endPoint(1) = y2: endPoint(2) = 0#
Set lineObj = ThisDrawing.ModelSpace.AddLine(startPoint, endPoint) ZoomAll
End SubSub Example_AddCircle(x1 as double,y1 as double,r as double)
Dim circleObj As AcadCircle Dim centerPoint(0 To 2) As Double Dim radius As Double
centerPoint(0) = x1: centerPoint(1) = y1: centerPoint(2) = 0# radius = r
Set circleObj = ThisDrawing.ModelSpace.AddCircle(centerPoint, radius)
End Sub |
|