RFFace.EnumAdjacentFaces



Your Ad Here

Description

Collects adjacent faces of the face in an RFEntityID array.

Syntax

Function RFFace.EnumAdjacentFaces(pFaceIDs As RFEntityID, pFaceCount As Long) As RFErrorCode

The EnumAdjacentFaces syntax has these parts:

Part Description
pFaceIDs [OUTRFEntityID Required. The first element of RFEntityID array to store adjacent faces RFEntityID.
pFaceCount [IN, OUTLong Required. The number of adjacent faces.

Remarks

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)
    
    ' Collectes the adjacent faces
    Dim fcID() As RFEntityID
    Dim nFcs As Long
    
    rfErr = fcObj.GetAdjacentFacesCount(nFcs)
    
    ' Allocate the memory space of the fcID array as the amount of nFcs
    ReDim fcID(nFcs)
    rfErr = fcObj.EnumAdjacentFaces(fcID(0), nFcs)
    
   ' Finally release the allocated memory space for the fcID array when it is no longer necessary.
    Erase fcID
    

Return to Rapidform Index


Your Ad Here