[求助]在ACAD中用VBA进行绘制圆台体或圆台面怎么做?-->mccad转移
在ACAD中用VBA进行绘制圆台体或圆台面怎么做?我是这么做的,但是好麻烦,希望高手指点一二,不胜感激
Dim circleObj As AcadCircle
Dim centerPoint(0 To 2) As Double
Dim radius As Double
' Define the circle
centerPoint(0) = 0#: centerPoint(1) = 0#: centerPoint(2) = 0#
radius = 5#
Dim curves(0 To 0) As AcadEntity
' Create the Circle object in model space
Set curves(0) = ThisDrawing.ModelSpace.AddCircle(centerPoint, radius)
Dim regionObj As Variant
regionObj = ThisDrawing.ModelSpace.AddRegion(curves)
Dim height As Double
Dim taperAngle As Double
height = 3
taperAngle = 45 * 3.1415925 / 180
Dim solidObj As Acad3DSolid
Set solidObj = ThisDrawing.ModelSpace.AddExtrudedSolid(regionObj(0), height, taperAngle)
就是你所说的这样做,还可以用SendCommand方法
用SendCommand方法需要使用专用的点及对象转换函数,在本站的二次开发->VBA->经验技巧中有介绍。 这个程序不实用啊,只画一个固定的圆台有什么用?
页:
[1]