AddArrayField Method


Creates a field containing an array of values in the Schema, with given name and type of contained values.

Namespace: Autodesk.Revit.DB.ExtensibleStorage
Assembly: RevitAPI (in RevitAPI.dll) Version: 24.0.0.0 (24.0.0.0)
Since:  2012

Syntax

C#
public FieldBuilder AddArrayField(
	string fieldName,
	Type fieldType
)
Visual Basic
Public Function AddArrayField ( _
	fieldName As String, _
	fieldType As Type _
) As FieldBuilder
Visual C++
public:
FieldBuilder^ AddArrayField(
	String^ fieldName, 
	Type^ fieldType
)

Parameters

fieldName
Type: SystemString
The name of the new field.
fieldType
Type: SystemType
The type of the contents in the new field.

Return Value

The FieldBuilder object may be used to add more details to the field. Make sure to set the unit type if the field contains floating-point values.

Remarks

The supported types for the contents are the same as for simple fields. See AddSimpleField(String, Type) for details.

Note that a schema may contain a maximum of 256 fields.

Exceptions

ExceptionCondition
Autodesk.Revit.ExceptionsArgumentException The parameter fieldName is not acceptable for naming Extensible Storage objects. -or- The field type is not supported.
Autodesk.Revit.ExceptionsArgumentNullException A non-optional argument was null
Autodesk.Revit.ExceptionsInvalidOperationException The SchemaBuilder has already finished building the Schema.

See Also