ScheduleDefinition Class

Settings that define the contents of a schedule.
Inheritance Hierarchy
SystemObject
  Autodesk.Revit.DBScheduleDefinition

Namespace: Autodesk.Revit.DB
Assembly: RevitAPI (in RevitAPI.dll) Version: 25.0.0.0 (25.0.0.0)
Syntax
public class ScheduleDefinition : IDisposable

The ScheduleDefinition type exposes the following members.

Properties
 NameDescription
Public propertyAreaSchemeId In an area schedule, the ID of the area scheme to display.
Public propertyCategoryId The category ID of elements appearing in the schedule.
Public propertyEmbeddedDefinition The embedded ScheduleDefinition.
Public propertyFamilyId In a note block schedule, the ID of the Generic Annotation family displayed by the schedule.
Public propertyGrandTotalTitle 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 propertyHasEmbeddedSchedule Indicates if this ScheduleDefinition has an embedded ScheduleDefinition.
Public propertyIncludeLinkedFiles Indicates if the schedule includes elements from linked files.
Public propertyIsEmbedded Indicates if this is an embedded ScheduleDefinition.
Public propertyIsFilteredBySheet Indicates if the schedule is set to filter by sheet.
Public propertyIsItemized Indicates if the schedule displays each element on a separate row or combines multiple grouped elements onto the same row.
Public propertyIsKeySchedule Indicates if the schedule is a key schedule.
Public propertyIsMaterialTakeoff Indicates if the schedule is a material takeoff.
Public propertyIsValidObject Specifies whether the .NET object represents a valid Revit entity.
Public propertyShowGrandTotal Indicates if a grand total row should be displayed at the bottom of the schedule.
Public propertyShowGrandTotalCount Indicates if the grand total row should display a count of elements in the schedule.
Public propertyShowGrandTotalTitle Indicates if the grand total row should display a title.
Public propertyShowGridLines Indicates if the schedule grid lines will be visible on a sheet.
Public propertyShowHeaders Indicates if the headers will be displayed in the schedule.
Public propertyShowTitle Indicates if the title will be displayed in the schedule.
Top
Methods
 NameDescription
Public methodAddEmbeddedSchedule Adds an embedded ScheduleDefinition.
Public methodCode exampleAddField(SchedulableField) Adds a regular field at the end of the list.
Public methodAddField(ScheduleFieldType) Adds a regular field at the end of the list.
Public methodAddField(ScheduleFieldType, ElementId) Adds a regular field at the end of the list.
Public methodCode exampleAddFilter Adds a new filter at the end of the list.
Public methodAddSortGroupField Adds a new sorting/grouping field at the end of the list.
Public methodCanFilter Checks whether filters can be added to this ScheduleDefinition.
Public methodCanFilterByGlobalParameters Checks whether a field can be used with a global parameter-based filter.
Public methodCanFilterByParameterExistence Checks whether a field can be used with a HasParameter filter.
Public methodCanFilterBySubstring Checks whether a field can be used with a substring-based filter.
Public methodCanFilterByValue Checks whether a field can be used with a value-based filter.
Public methodCanFilterByValuePresence Checks whether a field can be used with a value presence-based filter.
Public methodCanHaveEmbeddedSchedule Indicates if this ScheduleDefinition can have an embedded ScheduleDefinition added.
Public methodCanIncludeLinkedFiles Checks whether the schedule is a type that supports including elements from linked files.
Public methodCanSortByField Checks whether a field can be used for sorting/grouping.
Public methodClearFields Removes all fields.
Public methodClearFilters Removes all filters.
Public methodClearSortGroupFields Removes all sorting/grouping fields.
Public methodDisposeReleases all resources used by the ScheduleDefinition
Public methodEqualsDetermines whether the specified object is equal to the current object.
(Inherited from Object)
Public methodGetField(Int32) Gets a field.
Public methodGetField(ScheduleFieldId) Gets a field.
Public methodGetFieldCount Gets the number of fields in this ScheduleDefinition.
Public methodGetFieldId Converts a field index to the corresponding field ID.
Public methodGetFieldIndex Converts a field ID to the corresponding field index.
Public methodGetFieldOrder Gets the IDs of the current list of fields in order.
Public methodGetFilter Gets a filter.
Public methodGetFilterCount Gets the number of filters in this ScheduleDefinition.
Public methodGetFilters Gets all filters in this ScheduleDefinition.
Public methodGetHashCodeServes as the default hash function.
(Inherited from Object)
Public methodGetSchedulableFields Gets a list of all non-calculated/non-combined fields that are eligible to be included in this schedule.
Public methodGetSortGroupField Gets a sorting/grouping field.
Public methodGetSortGroupFieldCount Gets the number of sorting/grouping fields in this ScheduleDefinition.
Public methodGetSortGroupFields Gets all sorting/grouping fields in this ScheduleDefinition.
Public methodGetTypeGets the Type of the current instance.
(Inherited from Object)
Public methodGetValidCategoriesForEmbeddedSchedule Get all categories that can be used for an embedded ScheduleDefinition in this ScheduleDefinition.
Public methodInsertCombinedParameterField Adds a combined parameter field at the specified position in the list.
Public methodInsertField(SchedulableField, Int32) Adds a regular field at the specified position in the list.
Public methodInsertField(ScheduleFieldType, Int32) Adds a regular field at the specified position in the list.
Public methodInsertField(ScheduleFieldType, ElementId, Int32) Adds a regular field at the specified position in the list.
Public methodInsertFilter Adds a new filter at the specified position in the list.
Public methodInsertSortGroupField Adds a new sorting/grouping field at the specified position in the list.
Public methodIsSchedulableField Checks whether a non-calculated/non-combined field is eligible to be included in this schedule.
Public methodIsValidCategoryForEmbeddedSchedule Indicates if a category can be used for an embedded ScheduleDefinition in this ScheduleDefinition.
Public methodIsValidCategoryForFilterBySheet Checks whether a schedule can be filtered by sheet.
Public methodIsValidCombinedParameters Checks if data is valid for combined parameters
Public methodIsValidFieldId Checks whether a ScheduleFieldId is the ID of a field in this ScheduleDefinition.
Public methodIsValidFieldIndex Checks whether an integer is a valid zero-based field index in this ScheduleDefinition.
Public methodRemoveEmbeddedSchedule Removes the embedded ScheduleDefinition.
Public methodRemoveField(Int32) Removes a field.
Public methodRemoveField(ScheduleFieldId) Removes a field.
Public methodRemoveFilter Removes a filter.
Public methodRemoveSortGroupField Removes a sorting/grouping field.
Public methodSetFieldOrder Reorders the fields in the schedule.
Public methodSetFilter Replaces a filter.
Public methodSetFilters Replaces all filters in this ScheduleDefinition.
Public methodSetSortGroupField Replaces a sorting/grouping field.
Public methodSetSortGroupFields Replaces all sorting/grouping fields in this ScheduleDefinition.
Public methodToStringReturns 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