AddField Method (ScheduleFieldType, ElementId)


Schedule Definition Add Field(Schedule Field Type, Element Id) Method

Adds a regular field at the end of the list.

Namespace: Autodesk.Revit.DB
Assembly: RevitAPI (in RevitAPI.dll) Version: 25.0.0.0 (25.0.0.0)
Syntax
public ScheduleField AddField(
	ScheduleFieldType fieldType,
	ElementId parameterId
)

Parameters

fieldType ScheduleFieldType
The type of data displayed by the field.
parameterId ElementId
The ID of the parameter displayed by the field.

Return Value

ScheduleField
The new field.
Exceptions
Exception Condition
ArgumentNullException A non-optional argument was null
ArgumentOutOfRangeException A value passed for an enumeration argument is not a member of that enumeration
ArgumentsInconsistentException The field specified by fieldType and parameterId may not included in this ScheduleDefinition. -or- The field specified by fieldType and parameterId is already included in this ScheduleDefinition.
See Also