A geometric profile consisting of a loop of curves.
Namespace: Autodesk.Revit.DBAssembly: RevitAPI (in RevitAPI.dll) Version: 21.0.0.0 (21.1.1.109)
Syntax
C# |
---|
public class Profile : GeometryObject |
Visual Basic |
---|
Public Class Profile _ Inherits GeometryObject |
Visual C++ |
---|
public ref class Profile : public GeometryObject |
Remarks
The profile may be filled.
Examples

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); } } }

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 Sub
Inheritance 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