A geometric profile consisting of a loop of curves. 
   Namespace:   Autodesk.Revit.DB  
  Assembly:   RevitAPI  (in RevitAPI.dll) Version: 16.0.0.0 (16.0.0.0) 
Syntax
| C# | 
|---|
|  | 
| Visual Basic | 
|---|
|  | 
| Visual C++ | 
|---|
|  | 
Remarks
 The profile may be filled. 
 Examples
 Copy  C#
 Copy  C# public void GetProfile(Element element)
{
    string messageInfo = "Profile : ";
    if (element is FamilyInstance)
    {
        FamilyInstance beam = element as FamilyInstance;
        if (beam.StructuralType == StructuralType.Beam)
        {
            // Get swept profile
            Autodesk.Revit.DB.SweptProfile sweptProfile = beam.GetSweptProfile();
            Autodesk.Revit.DB.Profile profile = sweptProfile.GetSweptProfile();
            // Get swept profile curves size
            messageInfo += "\nSelection name : " + beam.Name;
            messageInfo += "\nSwept Profile Driving Curve size is " + profile.Curves.Size;
            messageInfo += "\nProfile is filled :  " + profile.Filled;
            if (!profile.IsReadOnly)
            {
                profile.Filled = !profile.Filled;
                messageInfo += "\nProfile is filled after setting:  " + profile.Filled;
            }
            TaskDialog.Show("Revit",messageInfo);
        }
    }
} Copy  VB.NET
 Copy  VB.NET Public Sub GetProfile(element As Element)
    Dim messageInfo As String = "Profile : "
    If TypeOf element Is FamilyInstance Then
        Dim beam As FamilyInstance = TryCast(element, FamilyInstance)
        If beam.StructuralType = StructuralType.Beam Then
       ' Get swept profile
       Dim sweptProfile As Autodesk.Revit.DB.SweptProfile = beam.GetSweptProfile()
            Dim profile As Autodesk.Revit.DB.Profile = sweptProfile.GetSweptProfile()
       ' Get swept profile curves size
            messageInfo += vbLf & "Selection name : " + beam.Name
            messageInfo += vbLf & "Swept Profile Driving Curve size is " + profile.Curves.Size
            messageInfo += vbLf & "Profile is filled :  " + profile.Filled
            If Not profile.IsReadOnly Then
                profile.Filled = Not profile.Filled
                messageInfo += vbLf & "Profile is filled after setting:  " + profile.Filled
            End If
            TaskDialog.Show("Revit", messageInfo)
        End If
    End If
End SubInheritance Hierarchy
  System Object  
Autodesk.Revit.DB APIObject
Autodesk.Revit.DB GeometryObject
Autodesk.Revit.DB Profile
 
 Autodesk.Revit.DB APIObject
Autodesk.Revit.DB GeometryObject
Autodesk.Revit.DB Profile