2020 Class
Changes 0
C

Profile

Description:
A geometric profile consisting of a loop of curves.
Remarks:
The profile may be filled.
Inheritance Hierarchy:
System.Object
  Autodesk.Revit.DB.APIObject
    Autodesk.Revit.DB.GeometryObject
      Autodesk.Revit.DB.Profile
public class Profile : GeometryObject
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);
        }
    }
}
Name Return Type Description Inherited From
M Clone() Profile Returns a copy of this profile.
M Dispose() None Causes the object to release immediately any resources it may be utilizing. APIObject
M op_Equality(GeometryObject, GeometryObject) bool Determines whether two GeometryObjects are the same. GeometryObject
M Equals(Object) bool Determines whether the specified is equal to the current . GeometryObject
M GetHashCode() int Gets the integer value of the geometry object as hash code GeometryObject
M op_Inequality(GeometryObject, GeometryObject) bool Determines whether two GeometryObjects are different. GeometryObject
Name Return Type Description Inherited From
P Curves CurveArray Retrieve the curves that make up the boundary of the profile.
P Filled bool Get or set whether the profile is filled.
P Transformed The transformed profile. Transforms this profile and returns the result.
P IsReadOnly bool Identifies if the object is read-only or modifiable. APIObject
P GraphicsStyleId ElementId The ElementId of the GeometryObject's GraphicsStyle GeometryObject
P IsElementGeometry bool Indicates whether this geometry is obtained directly from an Element. GeometryObject
P Visibility Visibility The visibility. GeometryObject