MoveProfile Method


Move a profile of the form, specified by a reference, and an offset vector.

Namespace: Autodesk.Revit.DB
Assembly: RevitAPI (in RevitAPI.dll) Version: 2015.0.0.0 (2015.0.0.0)

Syntax

C#
public void MoveProfile(
	int profileIndex,
	XYZ offset
)
Visual Basic
Public Sub MoveProfile ( _
	profileIndex As Integer, _
	offset As XYZ _
)
Visual C++
public:
void MoveProfile(
	int profileIndex, 
	XYZ^ offset
)

Parameters

profileIndex
Type: System Int32
Index to specify the profile.
offset
Type: Autodesk.Revit.DB XYZ
The vector by which the element is to be moved.

Examples

Copy C#
public void MoveForm(Form form)
{
    int profileCount = form.ProfileCount;
    if (form.ProfileCount > 0)
    {
        int profileIndex = 0;   // modify the first form only
        if (form.CanManipulateProfile(profileIndex))
        {
            XYZ offset = new XYZ(-25, 0, 0);
            form.MoveProfile(profileIndex, offset);
        }
    }
}
Copy VB.NET
Public Sub MoveForm(form As Form)
    Dim profileCount As Integer = form.ProfileCount
    If form.ProfileCount > 0 Then
        Dim profileIndex As Integer = 0
        ' modify the first form only
        If form.CanManipulateProfile(profileIndex) Then
            Dim offset As New XYZ(-25, 0, 0)
            form.MoveProfile(profileIndex, offset)
        End If
    End If
End Sub

See Also

ArchiLabs Desktop

Put AI to work inside Revit.

Give Desktop your instructions and project files to build Revit families, update model elements, and create views and schedules. Works directly in Revit and AutoCAD.

Explore Desktop →