ScheduleDefinition
Settings that define the contents of a schedule.
Inheritance Hierarchy
System.Object
Autodesk.Revit.DB.ScheduleDefinition
Namespace: Autodesk.Revit.DB
Assembly: RevitAPI (in RevitAPI.dll) Version: 25.0.0.0 (25.0.0.0)
Syntax
public class ScheduleDefinition : IDisposableThe ScheduleDefinition type exposes the following members.
Properties
Name
Description
Public Property
AreaSchemeId
In an area schedule, the ID of the area scheme to display.
Public Property
CategoryId
The category ID of elements appearing in the schedule.
Public Property
EmbeddedDefinition
The embedded ScheduleDefinition.
Public Property
FamilyId
In a note block schedule, the ID of the Generic Annotation family displayed by the schedule.
Public Property
GrandTotalTitle
The title name is used to display at the grand total row. The name is “Grand total”, expressed in the Revit session language, by default.
Public Property
HasEmbeddedSchedule
Indicates if this ScheduleDefinition has an embedded ScheduleDefinition.
Public Property
IncludeLinkedFiles
Indicates if the schedule includes elements from linked files.
Public Property
IsEmbedded
Indicates if this is an embedded ScheduleDefinition.
Public Property
IsFilteredBySheet
Indicates if the schedule is set to filter by sheet.
Public Property
IsItemized
Indicates if the schedule displays each element on a separate row or combines multiple grouped elements onto the same row.
Public Property
IsKeySchedule
Indicates if the schedule is a key schedule.
Public Property
IsMaterialTakeoff
Indicates if the schedule is a material takeoff.
Public Property
IsValidObject
Specifies whether the .NET object represents a valid Revit entity.
Public Property
ShowGrandTotal
Indicates if a grand total row should be displayed at the bottom of the schedule.
Public Property
ShowGrandTotalCount
Indicates if the grand total row should display a count of elements in the schedule.
Public Property
ShowGrandTotalTitle
Indicates if the grand total row should display a title.
Public Property
ShowGridLines
Indicates if the schedule grid lines will be visible on a sheet.
Public Property
ShowHeaders
Indicates if the headers will be displayed in the schedule.
Public Property
ShowTitle
Indicates if the title will be displayed in the schedule.
Methods
Name
Description
Public Method
AddEmbeddedSchedule
Adds an embedded ScheduleDefinition.
Public Method
Code Example
AddField(SchedulableField)
Adds a regular field at the end of the list.
Public Method
AddField(ScheduleFieldType)
Adds a regular field at the end of the list.
Public Method
AddField(ScheduleFieldType, ElementId)
Adds a regular field at the end of the list.
Public Method
Code Example
AddFilter
Adds a new filter at the end of the list.
Public Method
AddSortGroupField
Adds a new sorting/grouping field at the end of the list.
Public Method
CanFilter
Checks whether filters can be added to this ScheduleDefinition.
Public Method
CanFilterByGlobalParameters
Checks whether a field can be used with a global parameter-based filter.
Public Method
CanFilterByParameterExistence
Checks whether a field can be used with a HasParameter filter.
Public Method
CanFilterBySubstring
Checks whether a field can be used with a substring-based filter.
Public Method
CanFilterByValue
Checks whether a field can be used with a value-based filter.
Public Method
CanFilterByValuePresence
Checks whether a field can be used with a value presence-based filter.
Public Method
CanHaveEmbeddedSchedule
Indicates if this ScheduleDefinition can have an embedded ScheduleDefinition added.
Public Method
CanIncludeLinkedFiles
Checks whether the schedule is a type that supports including elements from linked files.
Public Method
CanSortByField
Checks whether a field can be used for sorting/grouping.
Public Method
ClearFields
Removes all fields.
Public Method
ClearFilters
Removes all filters.
Public Method
ClearSortGroupFields
Removes all sorting/grouping fields.
Public Method
Dispose
Releases all resources used by the ScheduleDefinition
Public Method
Equals
Determines whether the specified object is equal to the current object.
(Inherited from Object)
Public Method
GetField(Int32)
Gets a field.
Public Method
GetField(ScheduleFieldId)
Gets a field.
Public Method
GetFieldCount
Gets the number of fields in this ScheduleDefinition.
Public Method
GetFieldId
Converts a field index to the corresponding field ID.
Public Method
GetFieldIndex
Converts a field ID to the corresponding field index.
Public Method
GetFieldOrder
Gets the IDs of the current list of fields in order.
Public Method
GetFilter
Gets a filter.
Public Method
GetFilterCount
Gets the number of filters in this ScheduleDefinition.
Public Method
GetFilters
Gets all filters in this ScheduleDefinition.
Public Method
GetHashCode
Serves as the default hash function.
(Inherited from Object)
Public Method
GetSchedulableFields
Gets a list of all non-calculated/non-combined fields that are eligible to be included in this schedule.
Public Method
GetSortGroupField
Gets a sorting/grouping field.
Public Method
GetSortGroupFieldCount
Gets the number of sorting/grouping fields in this ScheduleDefinition.
Public Method
GetSortGroupFields
Gets all sorting/grouping fields in this ScheduleDefinition.
Public Method
GetType
Gets the Type of the current instance.
(Inherited from Object)
Public Method
GetValidCategoriesForEmbeddedSchedule
Get all categories that can be used for an embedded ScheduleDefinition in this ScheduleDefinition.
Public Method
InsertCombinedParameterField
Adds a combined parameter field at the specified position in the list.
Public Method
InsertField(SchedulableField, Int32)
Adds a regular field at the specified position in the list.
Public Method
InsertField(ScheduleFieldType, Int32)
Adds a regular field at the specified position in the list.
Public Method
InsertField(ScheduleFieldType, ElementId, Int32)
Adds a regular field at the specified position in the list.
Public Method
InsertFilter
Adds a new filter at the specified position in the list.
Public Method
InsertSortGroupField
Adds a new sorting/grouping field at the specified position in the list.
Public Method
IsSchedulableField
Checks whether a non-calculated/non-combined field is eligible to be included in this schedule.
Public Method
IsValidCategoryForEmbeddedSchedule
Indicates if a category can be used for an embedded ScheduleDefinition in this ScheduleDefinition.
Public Method
IsValidCategoryForFilterBySheet
Checks whether a schedule can be filtered by sheet.
Public Method
IsValidCombinedParameters
Checks if data is valid for combined parameters
Public Method
IsValidFieldId
Checks whether a ScheduleFieldId is the ID of a field in this ScheduleDefinition.
Public Method
IsValidFieldIndex
Checks whether an integer is a valid zero-based field index in this ScheduleDefinition.
Public Method
RemoveEmbeddedSchedule
Removes the embedded ScheduleDefinition.
Public Method
RemoveField(Int32)
Removes a field.
Public Method
RemoveField(ScheduleFieldId)
Removes a field.
Public Method
RemoveFilter
Removes a filter.
Public Method
RemoveSortGroupField
Removes a sorting/grouping field.
Public Method
SetFieldOrder
Reorders the fields in the schedule.
Public Method
SetFilter
Replaces a filter.
Public Method
SetFilters
Replaces all filters in this ScheduleDefinition.
Public Method
SetSortGroupField
Replaces a sorting/grouping field.
Public Method
SetSortGroupFields
Replaces all sorting/grouping fields in this ScheduleDefinition.
Public Method
ToString
Returns a string that represents the current object.
(Inherited from Object)
Remarks
The ScheduleDefinition class contains various settings that define the contents of a schedule view, including:
- The schedule’s category and other basic properties that determine the type of schedule.
- A set of fields that become the columns of the schedule.
- Filters that restrict the set of elements visible in the schedule.
- Sorting and grouping criteria.
Most schedules contain a single ScheduleDefinition. In Revit MEP, schedules of certain categories can contain an “embedded schedule” containing elements associated with the elements in the primary schedule, for example a room schedule showing the elements inside each room or a duct system schedule showing the elements associated with each system. An embedded schedule has its own category, fields, filters, etc. Those settings are stored in a second ScheduleDefinition object.