Settings Class


The settings object provides access to general components of the Autodesk Revit application, such as Categories.

Namespace: Autodesk.Revit.DB
Assembly: RevitAPI (in RevitAPI.dll) Version: 2015.0.0.0 (2015.0.0.0)

Syntax

C#
public class Settings : APIObject
Visual Basic
Public Class Settings _
	Inherits APIObject
Visual C++
public ref class Settings : public APIObject

Examples

Copy C#
// Get some of the settings information, including categories and FillPatterns
Settings settings = document.Settings;

// Format the prompt information string
String prompt = "Setting information: ";
prompt += "\nNumber of Categories: " + settings.Categories.Size;
FilteredElementCollector fillPatternCollector = new FilteredElementCollector(document);
prompt += "\nNumber of Fill Patterns: " + fillPatternCollector.OfClass(typeof(FillPatternElement)).Count();
FilteredElementCollector linePatternCollector = new FilteredElementCollector(document);
prompt += "\nNumber of Line Patterns: " + linePatternCollector.OfClass(typeof(LinePatternElement)).Count();

// Give the user some information
TaskDialog.Show("Revit",prompt);
Copy VB.NET
' Get some of the settings information, including categories and FillPatterns
Dim settings As Settings = document.Settings

' Format the prompt information string
Dim prompt As [String] = "Setting information: "
prompt += vbLf & "Number of Categories: " + settings.Categories.Size
Dim fillPatternCollector As New FilteredElementCollector(document)
prompt += vbLf & "Number of Fill Patterns: " & fillPatternCollector.OfClass(GetType(FillPatternElement)).Count()
Dim linePatternCollector As New FilteredElementCollector(document)
prompt += vbLf & "Number of Line Patterns: " & linePatternCollector.OfClass(GetType(LinePatternElement)).Count()

' Give the user some information
TaskDialog.Show("Revit", prompt)

Inheritance Hierarchy

See Also