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.

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.

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 be freedAllocated array of structures holding
attribute titles and values. This must
be freed by the caller using UF_free.

 


 
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 be freedAllocated array of structures holding
attribute titles and values. This must
be freed by the caller using UF_free.

 


 
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.

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.

NOTE: Only part attributes of type UF_ATTR_string are supported. All
other data types are unsupported for part attributes.

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_LEN.

Environment
Internal and External

See Also
Refer to the example .
This example function assigns user-defined object attributes to an object.
 
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_LEN+1)
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.

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_integer
UF_ATTR_real,
UF_ATTR_time
UF_ATTR_null,
UF_ATTR_string
UF_ATTR_any
UF_ATTR_reference
int *countOutputAttribute Count

 


 
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.

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_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_integer
UF_ATTR_real,
UF_ATTR_time
UF_ATTR_null,
UF_ATTR_string
UF_ATTR_any
UF_ATTR_reference
char *titleOutputAttribute Title (maximum character length is
UF_ATTR_MAX_TITLE_LEN+1)
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.

 


 
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.

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.

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_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_LEN+1)

 


 
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.

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.

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_integer
UF_ATTR_real,
UF_ATTR_time
UF_ATTR_null,
UF_ATTR_string
UF_ATTR_any
UF_ATTR_reference

 


 
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.

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.

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
char *titleInputAttribute Title (maximum character length is
UF_ATTR_MAX_TITLE_LEN+1)
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_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.

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.

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_LEN+1)
inttypeInputAttribute Type to Search:
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 be freedTyped 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_LEN + 1. 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_LEN + 1. If the value is
NULL, then the returned buffer will be allocated,
and the user is responsible for freeing it
by calling UF_free().
Typed Attribute Value:
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.