formZ SDK | 4.0 Call Back Reference | Object Attributes
Description
Custom attribute field info (Optional). This function is called by formZ to retrieve information about a particular attribute field. The information consists of field name, data type, default value, field format, minimum and maximum range. This information is retrieved, for example, in the Attributes Manager dialog. The index passed in needs to be interpreted by the plugin to address the proper field in the attribute. The index ranges between 0 and the value returned by fz_attr_cbak_get_field_count. Note, that it is not necessary to expose all fields of an attribute to a user in this fashion, just the ones that needs to be seen in the context of attribute and information management. The name returned by this function is also used to determine the proper reference in an expression in the Information Management dialog.
Plugin Prototype
fzrt_error_td fz_attr_cbak_get_field_info(
fzrt_int | field_indx, |
char * | name, |
fzrt_int | max_name_len, |
field_type, | |
unit_fmt_flt, | |
unit_fmt_int, | |
def_value, | |
min_value, | |
max_value, | |
vlist_uuid, | |
fzrt_int * | flags ) |
Parameters
field_indx [Input]
The index of the field. Ranges between 0 and the number of fields reported by fz_attr_cbak_get_field_count
name [Result]
The name of the field. Each field name must be unique among all the fields of the same attribute.
max_name_len [Input]
The maximum number of characters the name can have.
field_type [Result]
The formatting type of the field. It also determines, implicitly, which data type is used to store the information.
For the available field types, the data is stored in the following types :
FZ_ATTR_FIELD_TYPE_INTG fzrt_int
FZ_ATTR_FIELD_TYPE_FRCT double
FZ_ATTR_FIELD_TYPE_DIST double
FZ_ATTR_FIELD_TYPE_AREA double
FZ_ATTR_FIELD_TYPE_VOLM double
FZ_ATTR_FIELD_TYPE_ANGL double
FZ_ATTR_FIELD_TYPE_PCNT double
FZ_ATTR_FIELD_TYPE_CRCY double
FZ_ATTR_FIELD_TYPE_DATE fzrt_int
FZ_ATTR_FIELD_TYPE_TIME fzrt_int
FZ_ATTR_FIELD_TYPE_DURN fzrt_int
FZ_ATTR_FIELD_TYPE_BOOL fzrt_int
FZ_ATTR_FIELD_TYPE_STNG fz_string_td
FZ_ATTR_FIELD_TYPE_VLST fzrt_UUID_td (id of the field)
unit_fmt_flt [Result]
The unit format in which the value of the attribute field is displayed, if the field represents a double value (see field type value). The appropriate enum must be chosen. For example, if the field type is FZ_ATTR_FIELD_TYPE_AREA, unit_fmt_flt may be FZ_FUIM_FORMAT_FLOAT_AREA_SQIN or FZ_FUIM_FORMAT_FLOAT_AREA_SQKM, but not FZ_FUIM_FORMAT_FLOAT_VOLUME_CUIN.
unit_fmt_int [Result]
The unit format in which the value of the attribute field is displayed, if the field represents a fzrt_int value (see field type value). The appropriate enum must be chosen. For example, if the field type is FZ_ATTR_FIELD_TYPE_DATE, unit_fmt_int may be FZ_FUIM_FORMAT_INT_DATE_NATIVE, but not FZ_FUIM_FORMAT_INT_DURN_HHMMSS.
def_value [Result]
The default value for this field. Depending on the data type of the field, the fz_type_td needs to be set with the proper function.
min_value [Result]
The minimum value allowed for this field. This argument only needs to be set for integer or floating point fields.
max_value [Result]
The maximum value allowed for this field. This argument only needs to be set for integer or floating point fields.
vlist_uuid [Result]
If the field uses a value list (i.e. field_type is FZ_ATTR_FIELD_TYPE_VLST), the UUID of the value list is returned by this argument.
flags [Result]
Bit encoded flags, that determine, whether to use the minimum or maximum value, and if so, whether the minimum or maximum value is inclusive
Returns
error
Availability
5.0.0.0
Function Set
Defined in