ScheduleDefinition
Settings that define the contents of a schedule.
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.
System.Object
Autodesk.Revit.DB.ScheduleDefinition
public class ScheduleDefinition : IDisposable
| Name | Return Type | Description |
|---|---|---|
| AddEmbeddedSchedule(ElementId) | None | Adds an embedded ScheduleDefinition. |
| AddField(SchedulableField) | The new field. | Adds a regular field at the end of the list. |
| AddField(ScheduleFieldType) | The new field. | Adds a regular field at the end of the list. |
| AddField(ScheduleFieldType, ElementId) | The new field. | Adds a regular field at the end of the list. |
| AddFilter(ScheduleFilter) | None | Adds a new filter at the end of the list. |
| AddSortGroupField(ScheduleSortGroupField) | None | Adds a new sorting/grouping field at the end of the list. |
| CanFilterByGlobalParameters(ScheduleFieldId) | bool | Checks whether a field can be used with a global parameter-based filter. |
| CanFilterByParameterExistence(ScheduleFieldId) | bool | Checks whether a field can be used with a HasParameter filter. |
| CanFilterBySubstring(ScheduleFieldId) | bool | Checks whether a field can be used with a substring-based filter. |
| CanFilterByValue(ScheduleFieldId) | bool | Checks whether a field can be used with a value-based filter. |
| CanFilterByValuePresence(ScheduleFieldId) | bool | Checks whether a field can be used with a value presence-based filter. |
| CanFilter() | bool | Checks whether filters can be added to this ScheduleDefinition. |
| CanHaveEmbeddedSchedule() | bool | Indicates if this ScheduleDefinition can have an embedded ScheduleDefinition added. |
| CanIncludeLinkedFiles() | bool | Checks whether the schedule is a type that supports including elements from linked files. |
| CanSortByField(ScheduleFieldId) | bool | Checks whether a field can be used for sorting/grouping. |
| ClearFields() | None | Removes all fields. |
| ClearFilters() | None | Removes all filters. |
| ClearSortGroupFields() | None | Removes all sorting/grouping fields. |
| Dispose() | None | Releases all resources used by the |
| GetFieldCount() | int | Gets the number of fields in this ScheduleDefinition. |
| GetFieldId(Int32) | The field ID. | Converts a field index to the corresponding field ID. |
| GetFieldIndex(ScheduleFieldId) | The field index. | Converts a field ID to the corresponding field index. |
| GetField(Int32) | The field. | Gets a field. |
| GetField(ScheduleFieldId) | The field. | Gets a field. |
| GetFieldOrder() | IList<ScheduleFieldId> | Gets the IDs of the current list of fields in order. |
| GetFilterCount() | int | Gets the number of filters in this ScheduleDefinition. |
| GetFilter(Int32) | ScheduleFilter | Gets a filter. |
| GetFilters() | IList<ScheduleFilter> | Gets all filters in this ScheduleDefinition. |
| GetSchedulableFields() | IList<SchedulableField> | Gets a list of all non-calculated/non-combined fields that are eligible to be included in this schedule. |
| GetSortGroupFieldCount() | int | Gets the number of sorting/grouping fields in this ScheduleDefinition. |
| GetSortGroupField(Int32) | ScheduleSortGroupField | Gets a sorting/grouping field. |
| GetSortGroupFields() | IList<ScheduleSortGroupField> | Gets all sorting/grouping fields in this ScheduleDefinition. |
| GetValidCategoriesForEmbeddedSchedule() | ICollection<ElementId> | Get all categories that can be used for an embedded ScheduleDefinition in this ScheduleDefinition. |
| InsertCombinedParameterField(IList<TableCellCombinedParameterData>, String, Int32) | The new field. | Adds a combined parameter field at the specified position in the list. |
| InsertField(SchedulableField, Int32) | The new field. | Adds a regular field at the specified position in the list. |
| InsertField(ScheduleFieldType, ElementId, Int32) | The new field. | Adds a regular field at the specified position in the list. |
| InsertField(ScheduleFieldType, Int32) | The new field. | Adds a regular field at the specified position in the list. |
| InsertFilter(ScheduleFilter, Int32) | None | Adds a new filter at the specified position in the list. |
| InsertSortGroupField(ScheduleSortGroupField, Int32) | None | Adds a new sorting/grouping field at the specified position in the list. |
| IsSchedulableField(SchedulableField) | bool | Checks whether a non-calculated/non-combined field is eligible to be included in this schedule. |
| IsValidCategoryForEmbeddedSchedule(ElementId) | bool | Indicates if a category can be used for an embedded ScheduleDefinition in this ScheduleDefinition. |
| IsValidCombinedParameters(IList<TableCellCombinedParameterData>) | bool | Checks if data is valid for combined parameters |
| IsValidFieldId(ScheduleFieldId) | bool | Checks whether a ScheduleFieldId is the ID of a field in this ScheduleDefinition. |
| IsValidFieldIndex(Int32) | bool | Checks whether an integer is a valid zero-based field index in this ScheduleDefinition. |
| RemoveEmbeddedSchedule() | None | Removes the embedded ScheduleDefinition. |
| RemoveField(Int32) | None | Removes a field. |
| RemoveField(ScheduleFieldId) | None | Removes a field. |
| RemoveFilter(Int32) | None | Removes a filter. |
| RemoveSortGroupField(Int32) | None | Removes a sorting/grouping field. |
| SetFieldOrder(IList<ScheduleFieldId>) | None | Reorders the fields in the schedule. |
| SetFilter(Int32, ScheduleFilter) | None | Replaces a filter. |
| SetFilters(IList<ScheduleFilter>) | None | Replaces all filters in this ScheduleDefinition. |
| SetSortGroupField(Int32, ScheduleSortGroupField) | None | Replaces a sorting/grouping field. |
| SetSortGroupFields(IList<ScheduleSortGroupField>) | None | Replaces all sorting/grouping fields in this ScheduleDefinition. |
| Name | Return Type | Description |
|---|---|---|
| AreaSchemeId | ElementId | In an area schedule, the ID of the area scheme to display. |
| CategoryId | ElementId | The category ID of elements appearing in the schedule. |
| EmbeddedDefinition | ScheduleDefinition | The embedded ScheduleDefinition. |
| FamilyId | ElementId | In a note block schedule, the ID of the Generic Annotation family displayed by the schedule. |
| GrandTotalTitle | string | 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. |
| HasEmbeddedSchedule | bool | Indicates if this ScheduleDefinition has an embedded ScheduleDefinition. |
| IncludeLinkedFiles | bool | Indicates if the schedule includes elements from linked files. |
| IsEmbedded | bool | Indicates if this is an embedded ScheduleDefinition. |
| IsItemized | bool | Indicates if the schedule displays each element on a separate row or combines multiple grouped elements onto the same row. |
| IsKeySchedule | bool | Indicates if the schedule is a key schedule. |
| IsMaterialTakeoff | bool | Indicates if the schedule is a material takeoff. |
| IsValidObject | bool | Specifies whether the .NET object represents a valid Revit entity. |
| ShowGrandTotalCount | bool | Indicates if the grand total row should display a count of elements in the schedule. |
| ShowGrandTotal | bool | Indicates if a grand total row should be displayed at the bottom of the schedule. |
| ShowGrandTotalTitle | bool | Indicates if the grand total row should display a title. |
| ShowGridLines | bool | Indicates if the schedule grid lines will be visible on a sheet. |
| ShowHeaders | bool | Indicates if the headers will be displayed in the schedule. |
| ShowTitle | bool | Indicates if the title will be displayed in the schedule. |