The GetCylinderData function is a method of the Cylinder object. You get a
Cylinder object from a face whose geometry is cylindrical. In your sample
code you're already checking to see if the face is a cylinder. All you need
to do is change the line
Call GetCylinderData(Basepoint, Axis, Radius)
to
Call oFace.Geometry.GetCylinderData(Basepoint, Axis, Radius)
The Geometry property of the Face will return the corresponding geometry
object, which in this case will be a Cylinder object.
--
Brian Ekins
Autodesk Inventor API
wrote in message news:5907156@discussion.autodesk.com...
I want to get the axis and radius of the cylinder. There exists one function
"GetCylinderData( _
ByRef BasePoint() As Double, _
ByRef AxisVector() As Double, _
ByRef Radius As Double _
) "
I wrote one program to get and print the radius, basepoint and axis of
cylinder surface. The code is:
Dim oApp As Inventor.Application
Set oApp = ThisApplication
Dim oFace As Face
if Select Case oFace.SurfaceType = kCylinderSurface
Dim Basepoint(2) As Double
Dim Axis(2) As Double
Dim Radius As Double
Call GetCylinderData(Basepoint, Axis, Radius)
Print #FileNum, Basepoint(0); Basepoint(1); Basepoint(2); Radius;
Axis(0); Axis(1); Axis(2)
end if
But it seems that I can't use the function like this.How to use the
function?
Thanks!