ScheduleDefinition Class


Schedule Definition Class

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.3.0.0 (25.3.0.0)
Syntax
public class ScheduleDefinition : IDisposable

The 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.
Top
Methods
Name Description
Public method AddEmbeddedSchedule Adds an embedded ScheduleDefinition.
Public method 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 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
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
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
Public method SetFilter Replaces a filter.
Public method SetFilters
Public method SetSortGroupField Replaces a sorting/grouping field.
Public method SetSortGroupFields
Public method ToString Returns a string that represents the current object.
(Inherited from Object )
Top
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.

See Also