vba拉伸成实体,提示输入无效
<p><font face="Verdana">我想用一个圆,沿着螺旋线为路径拉伸。为什么到拉伸这一句提示“输入无效?”代码如下:</font></p><p> </p>
<p><font face="Verdana">'定义保存面域边界的数组</font></p>
<p><font face="Verdana">Dim Curves(0 To 0) As AcadCircle</font></p>
<p><font face="Verdana">' 创建圆,用作面域的边界</font></p>
<p><font face="Verdana">Dim center(0 To 2) As Double<br/>Dim radius As Double</font></p>
<p><font face="Verdana">center(0) = 0<br/>center(1) = 0<br/>center(2) = 0<br/>radius = 0.5</font></p>
<p><font face="Verdana">Set Curves(0) = AcadApp.ActiveDocument.ModelSpace.AddCircle(center, radius) '圆心和半径</font></p>
<p><font face="Verdana">' 创建面域<br/>Dim regionObj As Variant<br/>regionObj = AcadApp.ActiveDocument.ModelSpace.AddRegion(Curves)</font></p>
<p><font face="Verdana">'生成三维实体<br/> Dim solidObj As Acad3DSolid<br/> Set solidObj = AcadApp.ActiveDocument.ModelSpace.AddExtrudedSolidAlongPath(regionObj(0), splineobj)'运行到这里提示“输入无效?”<br/> <br/> splineobj.Delete<br/> regionObj(0).Delete</font></p>
<p> </p>
<p>是不是接面圆石螺旋线没有垂直的缘故啊?如果是,那么该怎么做?</p>
页:
[1]