RFVertex.SetAttribute



Your Ad Here

Description

Sets the specified attribute of the vertex to 1.

Syntax

Function RFVertex.SetAttribute(att As RFAttribute) As RFErrorCode

The SetAttribute syntax has these parts:

Part Description
att [INRFAttribute Required. Attribute or bitwise expression to set to 1.

Sample

Dim rfErr As RapidForm.RFErrorCode
Dim vtObj As RapidForm.RFVertex

    ' Assign the RFVertex interface object.
    Set vtObj = RapidForm.Vertex
    
    ' Pick a vertex.
    Dim pickedID As RFEntityID
    rfErr = RapidForm.SelectTools.PickEntity(RF_PICK_VERTEX, 1, pickedID)
    
    ' If an error happens, exit the subroutine.
    If rfErr <> RF_SUCCESS Then
        MsgBox RapidForm.Application.GetErrorMessage(rfErr)
        Exit Sub
    End If
    
    rfErr = vtObj.SetID(pickedID)
    
    ' Assigns a new attribute
    
    Dim att1 As RFAttribute    
    att1 = 2

    rfErr = vtObj.SetAttribute(att1)
    
    ' Checks if the attribute is to be set
    Dim bAttributed As Boolean
    rfErr = vtObj.IsAttributed(att1, bAttributed)
    
    ' Retrieves the whole attribute value of the vertex
    rfErr = vtObj.GetAttribute(att1)
    
    ' Reset the attribute
    rfErr = vtObj.ResetAttribute(att1)

Return to Rapidform Index


Your Ad Here