- UID
- 125116
- 积分
- 0
- 精华
- 贡献
-
- 威望
-
- 活跃度
-
- D豆
-
- 在线时间
- 小时
- 注册时间
- 2004-4-14
- 最后登录
- 1970-1-1
|
马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。
您需要 登录 才可以下载或查看,没有账号?立即注册
×
请高手指点,下面是一个关于用大圆柱减去小圆柱陈列的程序,即在大圆柱上挖这样的四个孔出来。但执行错误,且最后一句话始终错误。请专家告诉我怎么减去一个阵列。谢谢
'建立一个大圆柱
Dim cylinderobj1 As Acad3DSolid
Dim cylindercenter1(0 To 2) As Double
Dim cylindderradius1 As Double
Dim cylindherheight1 As Double
cylindercenter1(0) = 0#: cylindercenter1(1) = 0#: cylindercenter1(2) = 0#
cylinderradius1 = 10
cylinderheight1 = 20
Set cylinderobj1 = ThisDrawing.ModelSpace.AddCylinder(cylindercenter1, cylinderradius1, cylinderheight1)
cylinderobj1.color = acWhite
'建立小圆柱,并建立其阵列
Dim cylinderobj3 As Acad3DSolid
Dim cylindercenter3(0 To 2) As Double
Dim cylindderradius3 As Double
Dim cylindherheight3 As Double
cylindercenter3(0) = 5: cylindercenter3(1) = 0: cylindercenter3(2) = 0#
cylinderradius3 = 2
cylinderheight3 = 20
Set cylinderobj3 = ThisDrawing.ModelSpace.AddCylinder(cylindercenter3, cylinderradius3, cylinderheight3)
cylinderobj3.color = acWhite
Dim noofobjects As Integer
Dim angletofill As Double
Dim basepnt(0 To 2) As Double
noofobjects = 4
angletofill = 3.14
basepnt(0) = 0#: basepnt(1) = 0#: basepnt(2) = 0#
Dim retobj As Variant
retobj = cylinderobj3.ArrayPolar(noofobjects, angletofill, basepnt)
ZoomAll
'大圆柱剪去阵列(就这里总是错,是不是要换个其它语句才能剪去阵列了?)
cylinderobj1.Boolean acSubtraction, retobj |
|