Calculates the area of a surface or polysurface object. The results are based on the current drawing units.
Rhino.SurfaceArea (strObject [, intFaceIndex])
strObject |
Required. String. The object's identifier. |
intFaceIndex |
Optional. Number. If the object is a polysurface, then the index of the face to query. |
Array |
An array of area information if successful. The array will contain the following information:
|
|||||||||
Null |
If not successful, or on error. |
Const rhObjectSurface = 8
Dim strObject, arrMP
strObject = Rhino.GetObject("Select a surface", rhObjectSurface)
If Not IsNull(strObject) Then
arrMP = Rhino.SurfaceArea(strObject)
If IsArray(arrMP) Then
Rhino.Print "The surface area is: " & CStr(arrMP(0))
End If
End If