The Autodesk.Revit.DB.FilledRegionType
class in Revit represents a type of filled region that can be used to fill closed shapes and regions in a Revit project.
The FilledRegionType
class has the following properties:
Gets or sets the name of the filled region type.
Gets or sets a Boolean value that indicates whether the filled region type is visible.
Gets or sets the origin point of the filled region type.
Gets or sets the ID of the fill pattern used for the filled region type.
Gets or sets the color of the boundary line for the filled region type.
Gets or sets the style of the boundary line for the filled region type.
Gets or sets the weight of the boundary line for the filled region type.
The FilledRegionType
class has the following methods:
Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
A filled region is a graphical symbol that represents a region of space filled with a solid color or a pattern. Filled regions can be used to represent a variety of features in a Revit project, including walls, floors, roofs, furniture, and more.
The FilledRegionType
class provides a way for developers to programmatically create and manipulate different types of filled regions in a Revit project. Developers can use the FilledRegionType
class to customize the appearance of the filled region, including its color, pattern, and boundary line.
The following code sample demonstrates how to create a new filled region type and set its properties:
// Create a new filled region type
FilledRegionType filledRegionType = new FilledRegionType();
// Set the name of the filled region type
filledRegionType.Name = "My Filled Region Type";
// Set the fill pattern for the filled region type
filledRegionType.FillPatternId = new FillPatternElementId();
// Set the color of the boundary line for the filled region type
filledRegionType.LineColor = new Color(255, 0, 0);
// Set the weight of the boundary line for the filled region type
filledRegionType.LineWeight = 2;
// Save the filled region type to the Revit project
filledRegionType.Save();
In this example, we create a new FilledRegionType
object and set its various properties, including the name, fill pattern, color, and boundary line weight. We then save the new filled region type to the Revit project.