Revit 2026 API
Schedule |
Adds a regular field at the specified position in the list.
Namespace: Autodesk.Revit.DB
Assembly: RevitAPI (in RevitAPI.dll) Version: 26.0.4.0 (26.0.4.0)
Syntax
public ScheduleField InsertField( ScheduleFieldType fieldType, int index )
Public Function InsertField ( fieldType As ScheduleFieldType, index As Integer ) As ScheduleField
public: ScheduleField^ InsertField( ScheduleFieldType fieldType, int index )
member InsertField : fieldType : ScheduleFieldType * index : int -> ScheduleField
Parameters
- fieldType ScheduleFieldType
- The type of data displayed by the field.
- index Int32
- The index in the list of fields.
Return Value
ScheduleFieldThe new field.
| Exception | Condition |
|---|---|
| ArgumentException | The field specified by fieldType may not included in this ScheduleDefinition. -or- The field specified by fieldType is already included in this ScheduleDefinition. -or- The fieldType can't be CustomField. To add a CustomField, you should create a Schedulable field and add it. |
| ArgumentOutOfRangeException | index is not a valid insert position. -or- A value passed for an enumeration argument is not a member of that enumeration |
See Also