RFFace.CalcArea



Your Ad Here

Description

Calculates the area of the face.

Syntax

Function RFFace.CalcArea(pdArea As Double) As RFErrorCode

The CalcArea syntax has these parts:

Part Description
pdArea [OUTDouble Required. The area of the face.

Sample

Dim rfErr As RapidForm.RFErrorCode
Dim fcObj As RapidForm.RFFace

    ' Assign the RFFace interface object
    Set fcObj = RapidForm.Face
    
    ' Pick a face
    Dim pickedID As RFEntityID
    rfErr = RapidForm.SelectTools.PickEntity(RF_PICK_FACE, 1, pickedID)
    
    ' If an error happens, exit the subroutine.
    If rfErr <> RF_SUCCESS Then
        MsgBox RapidForm.Application.GetErrorMessage(rfErr)
        Exit Sub
    End If
    
    rfErr = fcObj.SetID(pickedID)
    
    ' Calculate the area of the face.
    Dim fcArea As Double
    rfErr = fcObj.CalcArea(fcArea)

Return to Rapidform Index


Your Ad Here