UF_ATTR_info_s (view source)
 
Defined in: uf_attr_types.h
 
Also known as:
 
Overview
UF_ATTR_info_t

User attribute information struct for setting and reading attributes

All the data members of this struct are updated with values from the attribute when an attribute is read.

The following data members of this struct are not used (they are ignored) when setting an attribute:
They are used only to report back information about the attribute when it is read.
alias
inherited
override
required
unset
locked (a separate function is used to manage locks)
owned_by_system
pdm_based

The following data of an attribute cannot be edited once the attribute is set:
type
title
alias
array
array_element_index
The dimensionality of the Unit specification (cannot change from mm to microA, but from mm to cm is fine)

The following data of an attribute can be set if and only if the attribute is not associated with a template. It cannot be modified once set.
type
alias
array
category
The dimensionality of the Unit specification (cannot change from mm to microA, but from mm to cm is fine)


Data Members

type
int
The type of the attribute. Valid values:
UF_ATTR_bool
UF_ATTR_integer
UF_ATTR_real
UF_ATTR_time
UF_ATTR_null
UF_ATTR_string
(NOTE: The UF_ATTR_reference is not supported in the functions that use this struct)

category
char *
The category of the attribute (may be NULL)

title
char *
The title of the attribute (may be NULL when used to find attributes)

alias
char *
The title alias of the attribute (may be NULL)

bool_value
logical
Boolean (logical) attribute value (default is returned when reading templates of non-set attributes)

integer_value
int
Integer attribute value (default is returned when reading templates of non-set attributes)

real_value
double
Real (double-precision real) attribute value (default is returned when reading templates of non-set attributes)

unit_type
tag_t
The tag of the unit type, if any, if the attribute is a real-type attribute (may be NULL_TAG)

expression
tag_t
An expression from which the attribute should get its value
NOTE: This is not supported if the attribute has a reference string (in such case the attribute maintains a system expression internally).
NOTE: This is not supported for attributes of type UF_ATTR_null or of type UF_ATTR_time

string_value
char *
String attribute value (the default value is returned when reading templates of non-set attributes).
This string is also returned for non-string attributes.

time_value [ 2 ]
int
Time/Date value (the default value is returned when reading templates of non-set attributes).
The time zone of the machine running the program is assumed

time_string
char *
Time/Date value (the default value is returned when reading templates of non-set attributes).
NULL is returned for non-time attributes

reference_string
char *
Reference string of a string type attribute if it is defined using a reference string.
NOTE: For these attributes, an expression reference cannot be used, as the attribute will maintain a system expression internally).
NULL is returned for attributes that are not defined using a reference string.

inherited
logical
The attribute is inherited from another object and not overridden

override
logical
The attribute is overriding an inherited attribute

locked
logical
The attribute is locked.
When an existing attribute is read, this flag indicates that the attribute cannot currently be modified.
The flag is set if the attribute is created from a template that has the 'Locked' flag, or if
it is reserved by the system or if is explicitly locked when set.
When an unset attribute template is read, this flag indicates whether attributes created from the template will be
locked when the part is saved and reloaded.

owned_by_system
logical
The attribute is a reserved system attribute.
When this flag is set, the attribute can be set and removed only by the system. It is also created locked. It cannot be unlocked.

required
logical
This attribute is required on the given object

unset
logical
The attribute has not been set (i.e. has no value) on the object (used when getting attribute information)

array
logical
The attribute is an array attribute

index
int
If this struct represents an array attribute element, this is the index (numerical, starting with 0).
After reading an attribute, it is valid only if 'Unset' is 'false' and 'Array' is 'true'.
The array size can be resized only one element at a time (adding or removing the last element).

pdm_based
logical
The attribute is synchronized with data in a PDM-system (Teamcenter).

__initialized
void *
Mark used to determine if this struct has been initialized.
(For internal use only - do not set/modify this member)