Profile Class |
A geometric profile consisting of a loop of curves.
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
Namespace: Autodesk.Revit.DB
Assembly: RevitAPI (in RevitAPI.dll) Version: 27.0.4.0 (27.0.4.0)
The Profile type exposes the following members.
| Name | Description | |
|---|---|---|
|
|
Curves | Retrieve the curves that make up the boundary of the profile. |
|
|
Filled | Get or set whether the profile is filled. |
|
|
GraphicsStyleId |
The ElementId of the GeometryObject's GraphicsStyle
(Inherited from GeometryObject ) |
|
|
Id |
A unique integer identifying the GeometryObject in its associated non view-specific GeometryElement.
(Inherited from GeometryObject ) |
|
|
IsElementGeometry |
Indicates whether this geometry is obtained directly from an Element.
(Inherited from GeometryObject ) |
|
|
IsReadOnly |
Identifies if the object is read-only or modifiable.
(Inherited from APIObject ) |
|
|
Transformed | Transforms this profile and returns the result. |
|
|
Visibility |
The visibility.
(Inherited from GeometryObject ) |
| Name | Description | |
|---|---|---|
|
|
Clone | Returns a copy of this profile. |
|
|
Dispose |
Causes the object to release immediately any resources it may be utilizing.
(Inherited from APIObject ) |
|
|
Equals |
Determines whether the specified
Object
is equal to the current
Object
.
(Inherited from GeometryObject ) |
|
|
GetHashCode |
Gets the integer value of the geometry object as hash code
(Inherited from GeometryObject ) |
|
|
GetType |
Gets the
Type
of the current instance.
(Inherited from Object ) |
|
|
ToString |
Returns a string that represents the current object.
(Inherited from Object ) |
The profile may be filled.
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);
}
}
}