ScheduleDefinition.InsertField(ScheduleFieldType, ElementId, Int32) Method

ScheduleDefinitionInsertField(ScheduleFieldType, ElementId, Int32) Method

Adds a regular field at the specified position in the list.

Namespace: Autodesk.Revit.DB
Assembly: RevitAPI (in RevitAPI.dll) Version: 25.0.0.0 (25.0.0.0)
Syntax
public ScheduleField InsertField(
	ScheduleFieldType fieldType,
	ElementId parameterId,
	int index
)
Public Function InsertField ( 
	fieldType As ScheduleFieldType,
	parameterId As ElementId,
	index As Integer
) As ScheduleField
public:
ScheduleField^ InsertField(
	ScheduleFieldType fieldType, 
	ElementId^ parameterId, 
	int index
)
member InsertField : 
        fieldType : ScheduleFieldType * 
        parameterId : ElementId * 
        index : int -> ScheduleField 

Parameters

fieldType  ScheduleFieldType
The type of data displayed by the field.
parameterId  ElementId
The ID of the parameter displayed by the field.
index  Int32
The index in the list of fields.

Return Value

ScheduleField
The new field.
Exceptions
ExceptionCondition
ArgumentNullException A non-optional argument was null
ArgumentOutOfRangeException index is not a valid insert position. -or- 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