Entity.Get<FieldType>(Field) Method

EntityGetFieldType(Field) Method

Retrieves the value of the field in the entity.

Namespace: Autodesk.Revit.DB.ExtensibleStorage
Assembly: RevitAPI (in RevitAPI.dll) Version: 26.0.4.0 (26.0.4.0)
Syntax
public FieldType Get<FieldType>(
	Field field
)
Public Function Get(Of FieldType) ( 
	field As Field
) As FieldType
public:
generic<typename FieldType>
FieldType Get(
	Field^ field
)
member Get : 
        field : Field -> 'FieldType 

Parameters

field  Field
The field to retrieve.

Type Parameters

FieldType
The type of the field

Return Value

FieldType
Exceptions
ExceptionCondition
ArgumentNullException A non-optional argument was NULL
InvalidOperationException The Field belongs to a different Schema from this Entity, or this Entity is invalid.
ArgumentException Requested type does not match the field type.
ArgumentException For floating-point fields, use the overload taking a ForgeTypeId parameter.
ArgumentException This field's subschema prevents reading.
Remarks

The template parameter must match the type of the field (specified when creating the Schema) exactly; this method does not perform data type conversions. The types for containers are IList for arrays and IDictionary for maps.

See Also