UF_ATTR_ask_locked (view source)
 
Defined in: uf_attr.h
 
Overview
Gets the lock status of an attribute on the object specified. If the attribute does not
exist for the specified attribute type then an error is returned.

Passing an object tag will result in querying an attribute
on that object. Passing in a part tag will result in querying
a part attribute for that part.

Discouraged in new applications

Environment
Internal and External
 
Required License(s)
gateway

 
int UF_ATTR_ask_locked
(
tag_t object,
char * title,
logical * locked
)
tag_tobjectInputPart tag or part attribute tag.
char *titleInputAttribute Title (maximum character length is UF_ATTR_MAX_TITLE_BUFSIZE)
logical *lockedOutputThe attribute's locked status

 


 
UF_ATTR_ask_part_attribute (view source)
 
Defined in: uf_attr.h
 
Overview
Find the part attribute object for the work part. Once the part attribute
object identifier is obtained, it may be used as
input to other routines that handle user defined attributes.
Each part has one and only one part attribute object.

NOTE: This function is no longer needed for any of the UF_ATTR functions, new and old.
Instead, the part tag may be used when reading and writing part attributes.

Discouraged in new applications

Environment
Internal and External
 
Required License(s)
gateway

 
int UF_ATTR_ask_part_attribute
(
tag_t * attribute
)
tag_t *attributeOutputObject Identifier of part attribute of the work part

 


 
UF_ATTR_ask_part_attrs (view source)
 
Defined in: uf_attr.h
 
Overview
Reads all of the part attributes from the specified part. The part must
be loaded to use this function.

Discouraged in new applications

Environment
Internal and External

See Also
UF_ATTR_part_attr_s
 
Required License(s)
gateway

 
int UF_ATTR_ask_part_attrs
(
const tag_t part_tag,
int * n_attributes,
UF_ATTR_part_attr_p_t * attributes
)
const tag_tpart_tagInputpart tag of the part from which to read attributes.
int *n_attributesOutputCount of attributes returned.
UF_ATTR_part_attr_p_t *attributesOutput to UF_*free*Allocated array of structures holding
attribute titles and values. This must
be freed by the caller using UF_free.

If a returned attribute type is UF_ATTR_string or
UF_ATTR_reference then the string returned
was dynamically allocated and you must use
UF_free to deallocate the memory.

If a returned attribute type is UF_ATTR_time, then
the value will be in the current time zone of the
machine on which the program is being executed.

 


 
UF_ATTR_ask_part_attrs_in_file (view source)
 
Defined in: uf_attr.h
 
Overview
Reads all the part attributes from a part file without requiring that the
part be opened. The values returned are always those stored on disk
even if the part is currently loaded in memory (use
UF_ATTR_ask_part_attrs for such a part). This routine is normally
considerably more efficient than opening the part and finding the part
attribute.

Environment
Internal and External

See Also
UF_ATTR_part_attr_s
 
Required License(s)
gateway

 
int UF_ATTR_ask_part_attrs_in_file
(
const char * part_name,
int * n_attributes,
UF_ATTR_part_attr_p_t * attributes
)
const char *part_nameInputPart file name to read part attributes from or
part name when using NX Manager (internal name).
int *n_attributesOutputCount of attributes returned.
UF_ATTR_part_attr_p_t *attributesOutput to UF_*free*Allocated array of structures holding
attribute titles and values. This must
be freed by the caller using UF_free.

If a returned attribute type is UF_ATTR_string or
UF_ATTR_reference then the string returned
was dynamically allocated and you must use
UF_free to deallocate the memory.

If a returned attribute type is UF_ATTR_time, then
the value will be in the current time zone of the
machine on which the program is being executed.

 


 
UF_ATTR_assign (view source)
 
Defined in: uf_attr.h
 
Overview
Assigns an attribute to the object specified. If the attribute does not
exist for the specified attribute type then create the attribute;
otherwise, modify its existing value.

The calling routine must call UF_MODL_update() to propagate the attribute
change.

Passing an object tag will result in modifying or creating an attribute
on that object. Passing in a part tag will result in modifying or
creating a part attribute for that part.

The part in which the object resides must be fully loaded.

If the attribute is of type UF_ATTR_string or UF_ATTR_reference, the
maximum length of its value is limited by UF_ATTR_MAX_STRING_BUFSIZE.

If the attribute is of type UF_ATTR_time, then the value is assumed to be
in the current timezone of the machine running the program.
The value, when stored in NX, is converted from that timezone to UTC.
The valid range for attributes of type UF_ATTR_time is from 01-Jan-1970 to 31-Dec-2105.

Environment
Internal and External

See Also
Refer to the example .
This example function assigns user-defined object attributes to an object.

Discouraged in new applications
 
Required License(s)
gateway

 
int UF_ATTR_assign
(
tag_t object,
char * title,
UF_ATTR_value_t value
)
tag_tobjectInputPart tag or part attribute tag.
char *titleInputAttribute Title (maximum character length is UF_ATTR_MAX_TITLE_BUFSIZE)
UF_ATTR_value_tvalueInputTyped Attribute Value

 


 
UF_ATTR_count_attributes (view source)
 
Defined in: uf_attr.h
 
Overview
Count the number of attributes of the specified type that belong to the
object. If the attribute type specified is UF_ATTR_any then return
the count for all types.

Passing an object tag will result in counting the attributes of
that object. Passing in a part tag will result in counting the
part attributes of that part.

Discouraged in new applications

Environment
Internal and External
 
Required License(s)
gateway

 
int UF_ATTR_count_attributes
(
tag_t object,
int type,
int * count
)
tag_tobjectInputPart tag or object tag.
inttypeInputAttribute Type:
UF_ATTR_bool
UF_ATTR_integer
UF_ATTR_real
UF_ATTR_time
UF_ATTR_null
UF_ATTR_string
UF_ATTR_any
UF_ATTR_reference
int *countOutputAttribute Count

 


 
UF_ATTR_count_user_attribute_titles (view source)
 
Defined in: uf_attr.h
 
Overview
UF_ATTR_count_user_attribute_titles

Count the number of attributes that satisfy the given iterator

NOTE: This function counts array attributes as one title.
(in other words, an array with 'n' elements adds only one to the returned count.

Environment
Internal and External

History
NX10.0.0
 
Required License(s)
gateway

 
int UF_ATTR_count_user_attribute_titles
(
tag_t object,
const UF_ATTR_iterator_t * iter,
int * count
)
tag_tobjectInputThe object holding the attributes
const UF_ATTR_iterator_t *iterInputIterator describing the attributes being counted.
The iterator is automatically reset.
int *countOutputThe count of attributes (and/or unset templates) found

 


 
UF_ATTR_count_user_attributes (view source)
 
Defined in: uf_attr.h
 
Overview
UF_ATTR_count_user_attributes

Count the number of attributes that satisfy the given iterator

NOTE: This function counts individual array elements of arrays
(in other words, an array with 'n' elements adds 'n' to the returned count.

Environment
Internal and External

History
NX8.5.3
 
Required License(s)
gateway

 
int UF_ATTR_count_user_attributes
(
tag_t object,
const UF_ATTR_iterator_t * iter,
int * count
)
tag_tobjectInputThe object holding the attributes
const UF_ATTR_iterator_t *iterInputIterator describing the attributes being counted.
The iterator is automatically reset.
int *countOutputThe count of attributes (and/or unset templates) found

 


 
UF_ATTR_cycle (view source)
 
Defined in: uf_attr.h
 
Overview
Cycle through all the object's attributes of the specified type,
returning the title and value of the next attribute.

If the type specified is UF_ATTR_any (or 6) then cycle through all the
attributes of the object.

NOTE: Callers should not rely on attributes being returned in any
particular order.

If there are no more attributes to cycle then
a zero will be returned as the cycle status(indx).

Passing an object tag will result in cycling the attributes of that object.
Passing in a part tag will result in cycling the part attributes of that
part.

Discouraged in new applications

Environment
Internal and External

See Also
Sample program ufx_cycle_internal.c
 
Required License(s)
gateway

 
int UF_ATTR_cycle
(
tag_t object,
int * indx,
int type,
char title [ UF_ATTR_MAX_TITLE_BUFSIZE ] ,
UF_ATTR_value_p_t value
)
tag_tobjectInputPart tag or object tag.
int *indxInput / OutputCycle Status:(input)
0 = Begin Cycling
Cycle Status:(output)
0 = Done Cycling or No Attribute Returned
1 = Next Attribute Returned
inttypeInputAttribute Type to Cycle:
UF_ATTR_bool
UF_ATTR_integer
UF_ATTR_real,
UF_ATTR_time
UF_ATTR_null,
UF_ATTR_string
UF_ATTR_any
UF_ATTR_reference
chartitle [ UF_ATTR_MAX_TITLE_BUFSIZE ] OutputAttribute Title (maximum character length is
UF_ATTR_MAX_TITLE_BUFSIZE)
UF_ATTR_value_p_tvalueInput / OutputTyped Attribute Value:(Input)
If type is UF_ATTR_string then
value->value.string must point to the character
array where the string value will be returned.
If type is UF_ATTR_reference then
value->value.reference must point to the
character array where the string value will be
returned.
Typed Attribute Value:(Output)
If type is UF_ATTR_any and the returned
value->type is UF_ATTR_string or
UF_ATTR_reference then the string returned
was dynamically allocated and you must use
UF_free to deallocate the memory.
If the returned value->type is UF_ATTR_time, then
the value will be in the current time zone of the
machine on which the program is being executed.

 


 
UF_ATTR_delete (view source)
 
Defined in: uf_attr.h
 
Overview
Deletes the attribute of the specified type from the object. If the type
is UF_ATTR_any (or 6), then this function will delete all attributes with
the given title.

The calling routine must call UF_MODL_update() to propagate the attribute
change.

The part in which the object resides must be fully loaded.

Passing in an object tag will result in deleting the attribute from that
object. Passing in a part tag will result in deleting a part attribute from
that part. Attributes that are inherited will not be deleted (and no error
message will be returned). To delete an inherited attribute, the object that
owns that attribute must be passed into the function.

Discouraged in new applications

Environment
Internal and External
 
Required License(s)
gateway

 
int UF_ATTR_delete
(
tag_t object,
int type,
char * title
)
tag_tobjectInputPart tag or part attribute tag.
inttypeInputAttribute Type:
UF_ATTR_bool
UF_ATTR_integer
UF_ATTR_real,
UF_ATTR_time
UF_ATTR_null,
UF_ATTR_string
UF_ATTR_any
UF_ATTR_reference
char *titleInputAttribute Title (maximum character length is
UF_ATTR_MAX_TITLE_BUFSIZE)

 


 
UF_ATTR_delete_all (view source)
 
Defined in: uf_attr.h
 
Overview
Deletes all attributes of the specified type from the object. If the type
is UF_ATTR_any (or 6) then this function removes all attributes from the
object.

The calling routine must call UF_MODL_update() to propagate the attribute
change.

The part in which the object resides must be fully loaded.

Passing in an object tag will result in deleting attributes from that
object. Passing in a part tag will result in deleting part attributes from
that part. Attributes that are inherited will not be deleted (and no error
message will be returned). To delete an inherited attribute, the object that
owns that attribute must be passed into the function.

Discouraged in new applications

Environment
Internal and External
 
Required License(s)
gateway

 
int UF_ATTR_delete_all
(
tag_t object,
int type
)
tag_tobjectInputPart tag or part attribute tag.
inttypeInputAttribute Type:
UF_ATTR_bool
UF_ATTR_integer
UF_ATTR_real,
UF_ATTR_time
UF_ATTR_null,
UF_ATTR_string
UF_ATTR_any
UF_ATTR_reference

 


 
UF_ATTR_delete_user_attribute_with_title_and_type (view source)
 
Defined in: uf_attr.h
 
Overview
UF_ATTR_delete_user_attribute_with_title_and_type

Delete the attribute with the given title and type

Environment
Internal and External

History
NX8.5.3
 
Required License(s)
gateway

 
int UF_ATTR_delete_user_attribute_with_title_and_type
(
tag_t object,
const char * title,
int type,
int index,
logical update
)
tag_tobjectInputThe object holding the attributes
const char *titleInputThe title of the attribute
inttypeInputThe attribute type
Valid values:
UF_ATTR_integer
UF_ATTR_real
UF_ATTR_time
UF_ATTR_null
UF_ATTR_string
UF_ATTR_bool
UF_ATTR_any
NOTE: If UF_ATTR_any is used, the first attribute encountered that matches
the given title (and index), is deleted
intindexInputThe array index
Set to UF_ATTR_NOT_ARRAY if the attribute is not an array.
Set to UF_ATTR_LAST_ELEMENT if the attribute is an array.
logicalupdateInputPerform an update immediately

 


 
UF_ATTR_delete_user_attributes (view source)
 
Defined in: uf_attr.h
 
Overview
UF_ATTR_delete_user_attributes

Delete all the attributes that satisfy the given iterator.

Environment
Internal and External

History
NX8.5.3
 
Required License(s)
gateway

 
int UF_ATTR_delete_user_attributes
(
tag_t object,
const UF_ATTR_iterator_t * iter,
logical update
)
tag_tobjectInputThe object holding the attributes
const UF_ATTR_iterator_t *iterInputIterator describing the attributes to be deleted.
The iterator is automatically reset.
logicalupdateInputPerform an update immediately

 


 
UF_ATTR_find_attribute (view source)
 
Defined in: uf_attr.h
 
Overview
Searches the specified attribute type for the attribute title. If the type
specified is UF_ATTR_any (or 6) then return the first attribute found with
the given title.

NOTE: Callers should not rely on attributes being returned in any
particular order.

UF_ATTR_bool(8)
If the attribute was found then the title_type parameter returns its
attribute type; otherwise, a zero is returned.

Passing an object tag will result in finding the attributes of
that object. Passing in a part tag will result in finding the
part attributes of that part.

Discouraged in new applications

Environment
Internal and External
 
Required License(s)
gateway

 
int UF_ATTR_find_attribute
(
tag_t object,
int type,
char * title,
int * title_type
)
tag_tobjectInputPart tag or object tag.
inttypeInputAttribute Type:
UF_ATTR_integer
UF_ATTR_real,
UF_ATTR_time
UF_ATTR_null,
UF_ATTR_string
UF_ATTR_any
UF_ATTR_reference
UF_ATTR_bool
char *titleInputAttribute Title (maximum character length is
UF_ATTR_MAX_TITLE_BUFSIZE)
int *title_typeOutputType of Attribute Found:
0 = Attribute Not Found.
UF_ATTR_integer
UF_ATTR_real
UF_ATTR_time
UF_ATTR_null
UF_ATTR_reference
UF_ATTR_string
UF_ATTR_bool

 


 
UF_ATTR_free_user_attribute_info_array (view source)
 
Defined in: uf_attr.h
 
Overview
UF_ATTR_free_user_attribute_info_array

Frees the strings held by an array of UF_ATTR_info_t structs as well as the array itself.
(Use after call to UF_ATTR_get_user_attributes)

Environment
Internal and External

History
NX8.5.3
 
Required License(s)
gateway

 
int UF_ATTR_free_user_attribute_info_array
(
int count,
UF_ATTR_info_t info [ ]
)
intcountInputthe count of attribute information structs in the array
UF_ATTR_info_tinfo [ ] Inputthe array of attribute information structs to be freed

 


 
UF_ATTR_free_user_attribute_info_strings (view source)
 
Defined in: uf_attr.h
 
Overview
UF_ATTR_free_user_attribute_info_strings

Frees the strings held by a UF_ATTR_info_t struct.

All strings held by the struct are freed.

Environment
Internal and External

History
NX8.5.3
 
Required License(s)
gateway

 
int UF_ATTR_free_user_attribute_info_strings
(
UF_ATTR_info_p_t info
)
UF_ATTR_info_p_tinfoInput / Outputthe attribute information containing strings to be freed

 


 
UF_ATTR_free_user_attribute_iterator_strings (view source)
 
Defined in: uf_attr.h
 
Overview
UF_ATTR_free_user_attribute_iterator_strings

Frees the strings held by a UF_ATTR_iterator_t struct.

All strings held by the struct are freed.
Note: The UF_ATTR API does not supply the strings held by this struct, this
function for convenience only.

Environment
Internal and External

History
NX8.5.3
 
Required License(s)
gateway

 
int UF_ATTR_free_user_attribute_iterator_strings
(
UF_ATTR_iterator_p_t iterator
)
UF_ATTR_iterator_p_titeratorInput / Outputthe attribute iterator containing strings to be freed

 


 
UF_ATTR_get_bool_user_attribute (view source)
 
Defined in: uf_attr.h
 
Overview
UF_ATTR_get_bool_user_attribute

Gets value of a boolean type attribute, if it exists

Environment
Internal and External

History
NX8.5.3
 
Required License(s)
gateway

 
int UF_ATTR_get_bool_user_attribute
(
tag_t object,
const char * title,
int index,
logical * value,
logical * has_attribute
)
tag_tobjectInputThe object holding the attribute
const char *titleInputThe attribute title
intindexInputThe array index (set to UF_ATTR_NOT_ARRAY if not an array)
logical *valueOutputThe value, if any
logical *has_attributeOutputAn attribute has been found

 


 
UF_ATTR_get_computational_time_user_attribute (view source)
 
Defined in: uf_attr.h
 
Overview
UF_ATTR_get_computational_time_user_attribute

Gets the value of a time type attribute, if it exists
The returned time is in the local time of the program that is running.

Environment
Internal and External

History
NX8.5.3
 
Required License(s)
gateway

 
int UF_ATTR_get_computational_time_user_attribute
(
tag_t object,
const char * title,
int index,
int value [ 2 ] ,
logical * has_attribute
)
tag_tobjectInputThe object holding the attribute
const char *titleInputThe attribute title
intindexInputThe array index (set to UF_ATTR_NOT_ARRAY if not an array)
intvalue [ 2 ] OutputTime/Date value as computational time
logical *has_attributeOutputAn attribute has been found

 


 
UF_ATTR_get_integer_user_attribute (view source)
 
Defined in: uf_attr.h
 
Overview
UF_ATTR_get_integer_user_attribute

Gets the value of a integer type attribute, if it exists

Environment
Internal and External

History
NX8.5.3
 
Required License(s)
gateway

 
int UF_ATTR_get_integer_user_attribute
(
tag_t object,
const char * title,
int index,
int * value,
logical * has_attribute
)
tag_tobjectInputThe object holding the attribute
const char *titleInputThe attribute title
intindexInputThe array index (set to UF_ATTR_NOT_ARRAY if not an array)
int *valueOutputThe value, if any
logical *has_attributeOutputAn attribute has been found

 


 
UF_ATTR_get_next_user_attribute (view source)
 
Defined in: uf_attr.h
 
Overview
UF_ATTR_get_next_user_attribute

Gets the information from the next attribute that satisfies the given iterator

NOTE: If the iteration is allowed to completed, the iterator is automatically reset.
If not, it must be reset with 'UF_ATTR_release_user_attribute_iterator()', or the iterator will leak memory.
NOTE: The supplied 'info' struct must be initialized before use.
Between calls to this function, the 'info' struct's strings do not have to be freed, as this is done prior to reading an attribute.
However after the last call, the returned 'info' struct's strings must be freed.
This can be done with UF_ATTR_free_user_attribute_info_strings().

Environment
Internal and External

History
NX8.5.3
 
Required License(s)
gateway

 
int UF_ATTR_get_next_user_attribute
(
tag_t object,
UF_ATTR_iterator_t * iter,
UF_ATTR_info_t * info,
logical * has_attribute
)
tag_tobjectInputThe object holding the attribute
UF_ATTR_iterator_t *iterInputIterator describing the attribute being queried.
If iteration is allowed to complete, iterator is reset by the system.
If not, reset with UF_ATTR_release_user_attribute_iterator() after use.
UF_ATTR_info_t *infoOutput to UF_*free*The attribute information for the first attribute (or unset template) found, if any.
After iteration ends, free embedded strings using UF_ATTR_free_user_attribute_info_strings().
logical *has_attributeOutputAn attribute (or unset template) has been found. If 'false', this ends the iteration.

 


 
UF_ATTR_get_null_user_attribute (view source)
 
Defined in: uf_attr.h
 
Overview
UF_ATTR_get_null_user_attribute

Queries the presence of a null type attribute

Environment
Internal and External

History
NX8.5.3
 
Required License(s)
gateway

 
int UF_ATTR_get_null_user_attribute
(
tag_t object,
const char * title,
int index,
logical * has_attribute
)
tag_tobjectInputThe object holding the attribute
const char *titleInputThe attribute title
intindexInputThe array index (set to UF_ATTR_NOT_ARRAY if not an array)
logical *has_attributeOutputAn attribute has been found

 


 
UF_ATTR_get_real_user_attribute (view source)
 
Defined in: uf_attr.h
 
Overview
UF_ATTR_get_real_user_attribute

Gets the value and units of a real type attribute, if it exists

Environment
Internal and External

History
NX8.5.3
 
Required License(s)
gateway

 
int UF_ATTR_get_real_user_attribute
(
tag_t object,
const char * title,
int index,
double * value,
tag_t * unit_type,
logical * has_attribute
)
tag_tobjectInputThe object holding the attribute
const char *titleInputThe attribute title
intindexInputThe array index (set to UF_ATTR_NOT_ARRAY if not an array)
double *valueOutputThe value, if any. If attribute has units, this value is in the returned units.
tag_t *unit_typeOutputThe unit type tag (NULL_TAG may be returned if unit-less)
logical *has_attributeOutputAn attribute has been found

 


 
UF_ATTR_get_reference_string_of_user_attribute (view source)
 
Defined in: uf_attr.h
 
Overview
UF_ATTR_get_reference_string_of_user_attribute

Gets the reference string (if any) of a string type attribute, if it exists and it has a reference string

Environment
Internal and External

History
NX8.5.3
 
Required License(s)
gateway

 
int UF_ATTR_get_reference_string_of_user_attribute
(
tag_t object,
const char * title,
int index,
char * * reference_string,
logical * has_attribute
)
tag_tobjectInputThe object holding the attribute
const char *titleInputThe attribute title
intindexInputThe array index (set to UF_ATTR_NOT_ARRAY if not an array)
char * *reference_stringOutput to UF_*free*Reference string (Free using UF_free() after use)
logical *has_attributeOutputAn attribute has been found AND it has a reference string

 


 
UF_ATTR_get_string_time_user_attribute (view source)
 
Defined in: uf_attr.h
 
Overview
UF_ATTR_get_string_time_user_attribute

Gets the value of a time type attribute, if it exists
The returned time is in the local time of the program that is running.

Environment
Internal and External

History
NX8.5.3
 
Required License(s)
gateway

 
int UF_ATTR_get_string_time_user_attribute
(
tag_t object,
const char * title,
int index,
char * * time_string,
logical * has_attribute
)
tag_tobjectInputThe object holding the attribute
const char *titleInputThe attribute title
intindexInputThe array index (set to UF_ATTR_NOT_ARRAY if not an array)
char * *time_stringOutput to UF_*free*Time/Date value formatted as a string (Free using UF_free() after use)
logical *has_attributeOutputAn attribute has been found

 


 
UF_ATTR_get_string_user_attribute (view source)
 
Defined in: uf_attr.h
 
Overview
UF_ATTR_get_string_user_attribute

Gets the value and reference string (if any) of a string type attribute, if it exists

Environment
Internal and External

History
NX8.5.3
 
Required License(s)
gateway

 
int UF_ATTR_get_string_user_attribute
(
tag_t object,
const char * title,
int index,
char * * string_value,
logical * has_attribute
)
tag_tobjectInputThe object holding the attribute
const char *titleInputThe attribute title
intindexInputThe array index (set to UF_ATTR_NOT_ARRAY if not an array)
char * *string_valueOutput to UF_*free*String attribute value (Free using UF_free() after use)
logical *has_attributeOutputAn attribute has been found

 


 
UF_ATTR_get_user_attribute (view source)
 
Defined in: uf_attr.h
 
Overview
UF_ATTR_get_user_attribute

Gets the information from the first attribute, if any, that satisfies the given iterator.

Environment
Internal and External

History
NX8.5.3
 
Required License(s)
gateway

 
int UF_ATTR_get_user_attribute
(
tag_t object,
const UF_ATTR_iterator_t * iter,
UF_ATTR_info_t * info,
logical * has_attribute
)
tag_tobjectInputThe object holding the attribute
const UF_ATTR_iterator_t *iterInputIterator describing the attribute being queried.
The iterator is automatically reset.
UF_ATTR_info_t *infoOutput to UF_*free*The attribute information for the first attribute (or unset template) found, if any.
This struct must be freed using UF_ATTR_free_user_attribute_info_strings() after use.
logical *has_attributeOutputAn attribute or (if the iterator allows it) an unset template has been found

 


 
UF_ATTR_get_user_attribute_with_title_and_type (view source)
 
Defined in: uf_attr.h
 
Overview
UF_ATTR_get_user_attribute_with_title_and_type

Gets the information from the attribute with the given title and type

Environment
Internal and External

History
NX8.5.3
 
Required License(s)
gateway

 
int UF_ATTR_get_user_attribute_with_title_and_type
(
tag_t object,
const char * title,
int type,
int index,
UF_ATTR_info_t * info,
logical * has_attribute
)
tag_tobjectInputThe object holding the attribute
const char *titleInputThe attribute title
inttypeInputThe attribute type
Valid values:
UF_ATTR_integer
UF_ATTR_real
UF_ATTR_time
UF_ATTR_null
UF_ATTR_string
UF_ATTR_bool
UF_ATTR_any
NOTE: If UF_ATTR_any is used, the first attribute encountered that matches
the given title (and index), is returned
intindexInputThe array index (set to UF_ATTR_NOT_ARRAY if not an array)
UF_ATTR_info_t *infoOutput to UF_*free*The attribute information for the first attribute (or unset template) found, if any.
This struct must be freed using UF_ATTR_free_user_attribute_info_strings() after use.
logical *has_attributeOutputAn attribute or (if the iterator allows it) an unset template has been found

 


 
UF_ATTR_get_user_attributes (view source)
 
Defined in: uf_attr.h
 
Overview
UF_ATTR_get_user_attributes

Get information for all the attributes that satisfy the given iterator.
This function will return an array of UF_ATTR_info_t structs that must be
freed after use with UF_ATTR_free_user_attribute_info_array()

Environment
Internal and External

History
NX8.5.3
 
Required License(s)
gateway

 
int UF_ATTR_get_user_attributes
(
tag_t object,
const UF_ATTR_iterator_t * iter,
int * num_attributes,
UF_ATTR_info_t * * info
)
tag_tobjectInputThe object holding the attributes
const UF_ATTR_iterator_t *iterInputIterator describing the attributes being queried.
The iterator is automatically reset.
int *num_attributesOutputThe number of attributes returned
UF_ATTR_info_t * *infoOutput to UF_*free*The information for the attributes (and/or unset templates) found.
Free using UF_ATTR_free_user_attribute_info_array() after use

 


 
UF_ATTR_has_user_attribute (view source)
 
Defined in: uf_attr.h
 
Overview
UF_ATTR_has_user_attribute

Query the object for the existence of an attribute that satisfies the given iterator

Environment
Internal and External

History
NX8.5.3
 
Required License(s)
gateway

 
int UF_ATTR_has_user_attribute
(
tag_t object,
const UF_ATTR_iterator_t * iter,
logical * has_attribute
)
tag_tobjectInputThe object holding the attributes
const UF_ATTR_iterator_t *iterInputIterator describing the attributes being queried.
The iterator is automatically reset.
logical *has_attributeOutputAn attribute (or unset template) has been found

 


 
UF_ATTR_has_user_attribute_with_title_and_type (view source)
 
Defined in: uf_attr.h
 
Overview
UF_ATTR_has_user_attribute_with_title_and_type

Query the object for the existence of an attribute that satisfies the given title and type.

Environment
Internal and External

History
NX8.5.3
 
Required License(s)
gateway

 
int UF_ATTR_has_user_attribute_with_title_and_type
(
tag_t object,
const char * title,
int type,
int index,
logical * has_attribute
)
tag_tobjectInputThe object holding the attributes
const char *titleInputThe title of the attribute
inttypeInputThe attribute type
Valid values:
UF_ATTR_integer
UF_ATTR_real
UF_ATTR_time
UF_ATTR_null
UF_ATTR_string
UF_ATTR_bool
UF_ATTR_any
NOTE: If UF_ATTR_any is used, the first attribute encountered that matches
the given title (and index), is noted as being present
intindexInputThe array index ((set to UF_ATTR_NOT_ARRAY if not an array)
logical *has_attributeOutputAn attribute (or unset template) has been found

 


 
UF_ATTR_init_user_attribute_info (view source)
 
Defined in: uf_attr.h
 
Overview
UF_ATTR_init_user_attribute_info

Initializes a UF_ATTR_info_t struct as follows:

All strings are set to NULL.
All numerical values are set to 0 or 0.0.
All logical values are set to false.
All tags are set to 0

NOTE: This function must be called before the struct can be used

Environment
Internal and External

History
NX8.5.3
 
Required License(s)
gateway

 
int UF_ATTR_init_user_attribute_info
(
UF_ATTR_info_p_t info
)
UF_ATTR_info_p_tinfoInput / Outputthe attribute information to be initialized

 


 
UF_ATTR_init_user_attribute_iterator (view source)
 
Defined in: uf_attr.h
 
Overview
UF_ATTR_init_user_attribute_iterator

Initializes a UF_ATTR_iterator_t struct as follows:

All strings are set to empty.
All logical values are set to 'false'.
The 'type' is set to 'UF_ATTR_any'.
The 'array_element_index' is set to 'UF_ATTR_ANY_ATTRIBUTE'

NOTE: If the info has pointers to strings that it does not own, such strings must be
set to NULL before this function is called.

Environment
Internal and External

History
NX8.5.3
 
Required License(s)
gateway

 
int UF_ATTR_init_user_attribute_iterator
(
UF_ATTR_iterator_p_t iter
)
UF_ATTR_iterator_p_titerInput / Outputthe attribute iterator to be initialized

 


 
UF_ATTR_read_reference_string (view source)
 
Defined in: uf_attr.h
 
Overview
Read the reference string of the given attribute, which must be of reference type.

If no attribute was found then a zero will be returned as the attribute's
type. Passing an object tag will result in reading a value from the
attributes of that object. Passing in a part tag will result in reading a
value from the part attribute of that part.

Discouraged in new applications

Environment
Internal and External
 
Required License(s)
gateway

 
int UF_ATTR_read_reference_string
(
tag_t object,
char * title,
UF_ATTR_value_p_t reference_string
)
tag_tobjectInputPart tag or object tag.
char *titleInputAttribute Title (maximum character length is
UF_ATTR_MAX_TITLE_BUFSIZE)
UF_ATTR_value_p_treference_stringInput / Output to UF_*free*Typed Attribute Value:
"value->value.reference" must either be NULL or
point to a character buffer of size
UF_ATTR_MAX_STRING_BUFSIZE. If the value is
NULL, then the returned buffer will be allocated,
and the user is responsible for freeing it
by calling UF_free().

 


 
UF_ATTR_read_value (view source)
 
Defined in: uf_attr.h
 
Overview
Read the value of the attribute of the given type with the specified
title. If the attribute's type is UF_ATTR_any (or 6) then return the
value of the first attribute found with the given title.

NOTE: Callers should not rely on attributes being returned in any
particular order.
UF_ATTR_bool (8)

If no attribute was found then a zero will be returned as the attribute's
type. Passing an object tag will result in reading a value from the
attributes of that object. Passing in a part tag will result in reading a
value from the part attribute of that part.

Discouraged in new applications

Environment
Internal and External

See Also
Refer to the example .
 
Required License(s)
gateway

 
int UF_ATTR_read_value
(
tag_t object,
char * title,
int type,
UF_ATTR_value_p_t value
)
tag_tobjectInputPart tag or object tag.
char *titleInputAttribute Title (maximum character length is
UF_ATTR_MAX_TITLE_BUFSIZE)
inttypeInputAttribute Type to Search:
UF_ATTR_bool
UF_ATTR_integer
UF_ATTR_real
UF_ATTR_time
UF_ATTR_null
UF_ATTR_string
UF_ATTR_any
UF_ATTR_reference
UF_ATTR_value_p_tvalueInput / Output to UF_*free*Typed Attribute Value:
If "type" is UF_ATTR_string then
"value->value.string" must either be NULL or
point to a character buffer of size
UF_ATTR_MAX_STRING_BUFSIZE. If the value is
NULL, then the returned buffer will be allocated,
and the user is responsible for freeing it
by calling UF_free().

If "type" is UF_ATTR_reference then
"value->value.string" must either be NULL or
point to a character buffer of size
UF_ATTR_MAX_STRING_BUFSIZE. If the value is
NULL, then the returned buffer will be allocated,
and the user is responsible for freeing it
by calling UF_free().

If "value->type" = 0, then the attribute does not
exist for the type searched.

If "type" is UF_ATTR_any and the returned
"value->type" is UF_ATTR_string or
UF_ATTR_reference, then the string returned
was dynamically allocated and you must use
UF_free to deallocate the memory.

If "value->type" is UF_ATTR_time, then
the value will be in the current time zone of the
machine on which the program is being executed.

 


 
UF_ATTR_release_user_attribute_iterator (view source)
 
Defined in: uf_attr.h
 
Overview
UF_ATTR_release_user_attribute_iterator

Resets and releases for re-use a UF_ATTR_iterator_t struct.

This must be done in two situations:

a. Before the iterator is to be reused for another iteration.
b. When the iterator is no longer in use

This function does not free the strings supplied with the iterator or the iterator itself,
but it does free internal memory associated with the iterator.

If a release is not done after the iteration is completed, the iterator may
produce unpredictable results when reused.
If a release is not done after the iterator is retired, the iterator will leak internal memory.

NOTE: Releasing an iterator twice is OK.
Iterations that are always completed (such when used in UFT_ATTR_has_user_attribute())
will automatically release the iterator. Please see the individual functions for details.

Environment
Internal and External

History
NX8.5.3
 
Required License(s)
gateway

 
int UF_ATTR_release_user_attribute_iterator
(
UF_ATTR_iterator_p_t iter
)
UF_ATTR_iterator_p_titerInput / Outputthe attribute iterator to be released

 


 
UF_ATTR_set_bool_user_attribute (view source)
 
Defined in: uf_attr.h
 
Overview
UF_ATTR_set_boolean_user_attribute

Creates a boolean type attribute with the option to update or not.

Environment
Internal and External

History
NX8.5.3
 
Required License(s)
gateway

 
int UF_ATTR_set_bool_user_attribute
(
tag_t object,
const char * title,
int index,
logical value,
logical update
)
tag_tobjectInputThe object receiving the attribute
const char *titleInputThe attribute title
intindexInputThe array index (set to UF_ATTR_NOT_ARRAY if not an array)
logicalvalueInputThe value
logicalupdateInputPerform an update immediately

 


 
UF_ATTR_set_computational_time_user_attribute (view source)
 
Defined in: uf_attr.h
 
Overview
UF_ATTR_set_computational_time_user_attribute

Creates a time type attribute with the option to update or not.

The time value must be entered in the current time zone of the machine running the program.

Environment
Internal and External

History
NX8.5.3
 
Required License(s)
gateway

 
int UF_ATTR_set_computational_time_user_attribute
(
tag_t object,
const char * title,
int index,
int value [ 2 ] ,
logical update
)
tag_tobjectInputThe object receiving the attribute
const char *titleInputThe attribute title
intindexInputThe array index (set to UF_ATTR_NOT_ARRAY if not an array)
intvalue [ 2 ] InputThe time value { day,min }
logicalupdateInputPerform an update immediately

 


 
UF_ATTR_set_integer_user_attribute (view source)
 
Defined in: uf_attr.h
 
Overview
UF_ATTR_set_integer_user_attribute

Creates a integer type attribute with the option to update or not.

Environment
Internal and External

History
NX8.5.3
 
Required License(s)
gateway

 
int UF_ATTR_set_integer_user_attribute
(
tag_t object,
const char * title,
int index,
int value,
logical update
)
tag_tobjectInputThe object receiving the attribute
const char *titleInputThe attribute title
intindexInputThe array index (set to UF_ATTR_NOT_ARRAY if not an array)
intvalueInputThe value
logicalupdateInputPerform an update immediately

 


 
UF_ATTR_set_locked (view source)
 
Defined in: uf_attr.h
 
Overview
Sets the lock status of an attribute on the object specified. If the attribute does not
exist for the specified attribute type then an error is returned.

Passing an object tag will result in modifying an attribute
on that object. Passing in a part tag will result in modifying
a part attribute for that part.

The part in which the object resides must be fully loaded.

Unlocking a locked attribute requires access via a Customer Default setting

Discouraged in new applications

Environment
Internal and External
 
Required License(s)
gateway

 
int UF_ATTR_set_locked
(
tag_t object,
char * title,
logical locked
)
tag_tobjectInputPart tag or part attribute tag.
char *titleInputAttribute Title (maximum character length is UF_ATTR_MAX_TITLE_BUFSIZE)
logicallockedInputThe new locked status

 


 
UF_ATTR_set_null_user_attribute (view source)
 
Defined in: uf_attr.h
 
Overview
UF_ATTR_set_null_user_attribute

Creates a null type attribute with the option to update or not.

Environment
Internal and External

History
NX8.5.3
 
Required License(s)
gateway

 
int UF_ATTR_set_null_user_attribute
(
tag_t object,
const char * title,
int index,
logical update
)
tag_tobjectInputThe object receiving the attribute
const char *titleInputThe attribute title
intindexInputThe array index (set to UF_ATTR_NOT_ARRAY if not an array)
logicalupdateInputPerform an update immediately

 


 
UF_ATTR_set_real_user_attribute (view source)
 
Defined in: uf_attr.h
 
Overview
UF_ATTR_set_real_user_attribute

Creates a real type attribute with the option to update or not.

NOTE: The supplied 'unit_type' must be consistent with the unit specification of an existing attribute or template with same title.
In other words, the attribute's unit measure cannot change, but its display units can.
If 'unit_type' are not supplied (set to NULL_TAG), then:
If an existing attribute or template is found, then the units of that attribute or template are used.
If no existing attribute or template is found, then the attribute is set to be unit-less.
If 'unit_type' are supplied, then:
If an existing attribute is found, then that attribute's display unit is modified to use the input 'unit_type'.
If no existing attribute is found, then the attribute is created with the given 'unit_type' as its display units.

Environment
Internal and External

History
NX8.5.3
 
Required License(s)
gateway

 
int UF_ATTR_set_real_user_attribute
(
tag_t object,
const char * title,
int index,
double value,
tag_t unit_type,
logical update
)
tag_tobjectInputThe object receiving the attribute
const char *titleInputThe attribute title
intindexInputThe array index (set to UF_ATTR_NOT_ARRAY if not an array)
doublevalueInputThe value
tag_tunit_typeInputThe unit type tag (may be NULL_TAG)
logicalupdateInputPerform an update immediately

 


 
UF_ATTR_set_reference_string_user_attribute (view source)
 
Defined in: uf_attr.h
 
Overview
UF_ATTR_set_reference_string_user_attribute

Creates a string type attribute with the option to update or not.
This string attribute will be created with the given reference string.

Environment
Internal and External

History
NX8.5.3
 
Required License(s)
gateway

 
int UF_ATTR_set_reference_string_user_attribute
(
tag_t object,
const char * title,
int index,
const char * reference_string,
logical update
)
tag_tobjectInputThe object receiving the attribute
const char *titleInputThe attribute title
intindexInputThe array index (set to UF_ATTR_NOT_ARRAY if not an array)
const char *reference_stringInputThe reference string
logicalupdateInputPerform an update immediately

 


 
UF_ATTR_set_string_time_user_attribute (view source)
 
Defined in: uf_attr.h
 
Overview
UF_ATTR_set_string_time_user_attribute

Creates a time type attribute with the option to update or not.

The time value in either case is in the current time zone of the machine running the program.

Environment
Internal and External

History
NX8.5.3
 
Required License(s)
gateway

 
int UF_ATTR_set_string_time_user_attribute
(
tag_t object,
const char * title,
int index,
const char * value,
logical update
)
tag_tobjectInputThe object receiving the attribute
const char *titleInputThe attribute title
intindexInputThe array index (set to UF_ATTR_NOT_ARRAY if not an array)
const char *valueInputTime/Date value as a formatted string
logicalupdateInputPerform an update immediately

 


 
UF_ATTR_set_string_user_attribute (view source)
 
Defined in: uf_attr.h
 
Overview
UF_ATTR_set_string_user_attribute

Creates a string type attribute with the option to update or not.

Environment
Internal and External

History
NX8.5.3
 
Required License(s)
gateway

 
int UF_ATTR_set_string_user_attribute
(
tag_t object,
const char * title,
int index,
const char * value,
logical update
)
tag_tobjectInputThe object receiving the attribute
const char *titleInputThe attribute title
intindexInputThe array index (set to UF_ATTR_NOT_ARRAY if not an array)
const char *valueInputThe value
logicalupdateInputPerform an update immediately

 


 
UF_ATTR_set_time_string_format (view source)
 
Defined in: uf_attr.h
 
Overview
UF_ATTR_set_time_string_format

Sets the format used to convert a time attribute value to a string (and vice versa)
This function will override (replaces) any format set via the environment variable 'UGII_DEFAULT_DATE_ATTRIBUTE_DISPLAY_FORMAT'.
To allow setting a format temporarily, this function returns the existing format.
The given format is a string that has the following tokens. Interspersed text will be copied:
%b abbreviated month name
%B full month name
%d day of the month(0-31)
%H hour(24-hour clock)(00-23)
%I hour(12-hour clock)(01-12)
%m month(01-12)
%M minute(00-59)
%S second(00-59)
%y year without century(00-99)
%Y year with century(1970-2069)

Example:
%d-%b-%Y %H:%M:%S is the format that gives 01-Mar-2011 22:16:32

If no format is set (via the environment variable or via this function), then the example format is used by default.

Environment
Internal and External

History
NX8.5.3
 
Required License(s)
gateway

 
int UF_ATTR_set_time_string_format
(
const char * new_format,
char * * old_format
)
const char *new_formatInputThe new format to be used
char * *old_formatOutput to UF_*free*The format previously in used (optional - may be NULL.
If not NULL, the caller is responsible for freeing the returned old format string.
Free using UF_free() after use.

 


 
UF_ATTR_set_user_attribute (view source)
 
Defined in: uf_attr.h
 
Overview
UF_ATTR_set_user_attribute

Creates or modifies an attribute with the option to update or not.

NOTE: To set a date/time type attribute, either a formatted string or a computational value may be used.
If both are set (the string is not empty ("") and the computational value is not (0,0)), then the computational value will take precedence.
The time value in either case is in the current time zone of the machine running the program.

NOTE: To set a real type attribute, there is the option to include a units specification.
The supplied 'unit_type' must be consistent with the unit specification of an existing attribute or template with same title.
In other words, the attribute's unit measure cannot change, but its display units can.
If 'unit_type' are not supplied (the tag is NULL_TAG)
If an existing attribute or template is found, then the units of that attribute or template are used.
If no existing attribute or template is found, then the attribute is set to be unit-less.
If 'unit_type' are supplied:
If an existing attribute is found, then that attribute's display unit is modified to use the input 'unit_type'.
If no existing attribute is found, then the attribute is created with the given 'unit_type' as its display units.

Environment
Internal and External

History
NX8.5.3
 
Required License(s)
gateway

 
int UF_ATTR_set_user_attribute
(
tag_t object,
const UF_ATTR_info_t * info,
logical update
)
tag_tobjectInputThe object receiving the attribute
const UF_ATTR_info_t *infoInputThe attribute information for the attribute (make sure to initialize it first)
logicalupdateInputPerform an update immediately

 


 
UF_ATTR_set_user_attribute_lock_with_title_and_type (view source)
 
Defined in: uf_attr.h
 
Overview
UF_ATTR_set_user_attribute_lock_with_title_and_type

Set the locks on the attributes with the given title and type

NOTE: This function cannot set locks on individual array elements

Environment
Internal and External

History
NX8.5.3
 
Required License(s)
gateway

 
int UF_ATTR_set_user_attribute_lock_with_title_and_type
(
tag_t object,
const char * title,
int type,
logical locked
)
tag_tobjectInputThe object holding the attributes
const char *titleInputThe title of the attribute
inttypeInputThe attribute type
Valid values:
UF_ATTR_integer
UF_ATTR_real
UF_ATTR_time
UF_ATTR_null
UF_ATTR_string
UF_ATTR_bool
UF_ATTR_any
NOTE: If UF_ATTR_any is used, the first attribute encountered that matches
the given title will have its lock modified
logicallockedInputThe status of the lock to be set ('true': locked or 'false': unlocked)

 


 
UF_ATTR_set_user_attribute_locks (view source)
 
Defined in: uf_attr.h
 
Overview
UF_ATTR_set_user_attribute_locks

Set the locks on all the attributes that satisfy the given iterator.

NOTE: This function cannot set locks on individual array elements

Environment
Internal and External

History
NX8.5.3
 
Required License(s)
gateway

 
int UF_ATTR_set_user_attribute_locks
(
tag_t object,
const UF_ATTR_iterator_t * iter,
logical locked
)
tag_tobjectInputThe object holding the attributes
const UF_ATTR_iterator_t *iterInputIterator describing the attributes to be locked.
The iterator is automatically reset.
logicallockedInputThe status of the lock to be set ('true': locked or 'false': unlocked)

 


 
UF_UNIT_ask_measure_type_from_unit_tag (view source)
 
Defined in: uf_unit.h
 
Overview
UF_UNIT_ask_measure_type_from_unit_tag

Given a unit tag, return the measure type

Environment
Internal and External

History
NX8.5.3
 
Required License(s)
gateway

 
int UF_UNIT_ask_measure_type_from_unit_tag
(
tag_t unit,
UF_UNIT_MEASURE_TYPE_p_t measure_type
)
tag_tunitInputThe tag of the unit type
UF_UNIT_MEASURE_TYPE_p_tmeasure_typeOutputThe measure type associated with the given units (see uf_unit_types.h)

 


 
UF_UNIT_ask_system_unit_tag_from_measure (view source)
 
Defined in: uf_unit.h
 
Overview
UF_UNIT_ask_system_unit_tag_from_measure

Given a unit type name and the associated measure type, return the tag of the system unit type.
The system units is that used to store values in the part file (as opposed to display units).

To properly select the units, an object in the part as well as the measure type
must be provided.

Environment
Internal and External

History
NX8.5.3
 
Required License(s)
gateway

 
int UF_UNIT_ask_system_unit_tag_from_measure
(
tag_t object,
UF_UNIT_MEASURE_TYPE_t unit_measure_type,
tag_t * unit
)
tag_tobjectInputThe units context (an object in the part where the units are used)
UF_UNIT_MEASURE_TYPE_tunit_measure_typeInputThe measure type of the units (see uf_unit_types.h)
tag_t *unitOutputThe tag of the unit type

 


 
UF_UNIT_ask_unit_name_from_unit_tag (view source)
 
Defined in: uf_unit.h
 
Overview
UF_UNIT_ask_unit_name_from_unit_tag

Given a unit tag, return the unit name of the units

For example, the name for millimeters is "MilliMeter", defined in uf_unit_types.h as 'UF_UNIT_LENGTH_mm
The returned string must be freed after use.

Environment
Internal and External

History
NX8.5.3
 
Required License(s)
gateway

 
int UF_UNIT_ask_unit_name_from_unit_tag
(
tag_t unit,
char * * name
)
tag_tunitInputThe tag of the unit type
char * *nameOutput to UF_*free*The unit name of the units (see uf_unit_types.h)

 


 
UF_UNIT_ask_unit_tag_from_unit_name (view source)
 
Defined in: uf_unit.h
 
Overview
UF_UNIT_ask_unit_tag_from_unit_name

Given a unit type name and the associated measure type, return the tag of the unit type

The given name is the name of the units as defined in uf_unit_types.h
To properly select the units, an object in the part as well as the measure type
must be provided.

For example, the name for millimeters is "MilliMeter", defined in uf_unit_types.h as 'UF_UNIT_LENGTH_mm

Environment
Internal and External

History
NX8.5.3
 
Required License(s)
gateway

 
int UF_UNIT_ask_unit_tag_from_unit_name
(
tag_t object,
UF_UNIT_MEASURE_TYPE_t unit_measure_type,
const char * name,
tag_t * unit
)
tag_tobjectInputThe units context (an object in the part where the units are used)
UF_UNIT_MEASURE_TYPE_tunit_measure_typeInputThe measure type of the units (see uf_unit_types.h)
const char *nameInputThe name of the unit type (see uf_unit_types.h)
tag_t *unitOutputThe tag of the unit type

 


 
UF_UNIT_convert_value (view source)
 
Defined in: uf_unit.h
 
Overview
UF_UNIT_convert_value

Given a value with a given unit type, convert it to a value in a new unit type.

The measure type of the new units must be the same as that of the initial units

Environment
Internal and External

History
NX8.5.3
 
Required License(s)
gateway

 
int UF_UNIT_convert_value
(
double initial_value,
tag_t initial_units,
tag_t new_units,
double * converted_value
)
doubleinitial_valueInputThe value to be converted
tag_tinitial_unitsInputThe tag of the unit type of the initial value
tag_tnew_unitsInputThe tag of the unit type of the new units
double *converted_valueOutputThe value expressed in the new units