RFFace.IsAttributed



Your Ad Here

Description

Checks if the specified attribute of the face is set to 1 or not.

Syntax

Function RFFace.IsAttributed(att As RFAttribute, pbResult As Boolean) As RFErrorCode

The IsAttributed syntax has these parts:

Part Description
att [INRFAttribute Required. Attribute or bitwise expression to check.
pbResult [OUTBoolean Required. A Boolean value indicating whether a specified attribute is set to 1.

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)

   ' Attribute setting
    Dim att1 As RFAttribute
    
    ' Set a new attribute
    att1 = 2
    rfErr = fcObj.SetAttribute(att1)
    
    ' Check if the attribute is to be set.
    Dim bAttributed As Boolean
    rfErr = fcObj.IsAttributed(att1, bAttributed)
    
    ' Retrieve the whole attribute.
    rfErr = fcObj.GetAttribute(att1)
            
    ' Reset the attribute.
    rfErr = fcObj.ResetAttribute(att1)

Return to Rapidform Index


Your Ad Here