RFVertex.GetPoint



Your Ad Here

Description

Retrieves the vertex position.

Syntax

Function RFVertex.GetPoint(pPoint As RFPoint3) As RFErrorCode

The GetPoint syntax has these parts:

Part Description
pPoint [OUTRFPoint3 Required. Coordinates of the vertex.

Remarks

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)
    
    ' Retrieves the coordinates of the vertex
    Dim vtPt As RFPoint3
    rfErr = vtObj.GetPoint(vtPt)
    
    ' Assigns new coordinates
    vtPt.x = vtPt.x + 10
    vtPt.y = vtPt.y + 10
    vtPt.z = vtPt.z + 10
    
    rfErr = vtObj.SetPoint(vtPt)

Return to Rapidform Index


Your Ad Here