UF_ATTR_ask_part_attribute (查看源代码)
定义在: uf_attr.h
概述
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.
环境
内部和外部
需要许可证(S)
gateway (UG入口基本模块,Gateway是所有其它Uuigraphics模块的一个必要条件)
int UF_ATTR_ask_part_attribute
(
tag_t * attribute
)
UF_ATTR_ask_part_attrs (查看源代码)
定义在: uf_attr.h
概述
Reads all of the part attributes from the specified part. The part must
be loaded to use this function.
环境
Internal and External
参见
需要许可证(S)
gateway (UG入口基本模块,Gateway是所有其它Uuigraphics模块的一个必要条件)
int UF_ATTR_ask_part_attrs
(
const tag_t part_tag,
int * n_attributes,
UF_ATTR_part_attr_p_t * attributes
)
| const tag_t | part_tag | Input(输入) | part tag of the part from which to read attributes. |
| int * (整数型指针) | n_attributes | Output(输出) | Count of attributes returned. |
| UF_ATTR_part_attr_p_t * | attributes | Output to be freed 输出并释放 | Allocated 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 (查看源代码)
定义在: uf_attr.h
概述
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.
环境
Internal and External
参见
需要许可证(S)
gateway (UG入口基本模块,Gateway是所有其它Uuigraphics模块的一个必要条件)
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_name | Input(输入) | Part file name to read part attributes from or part name when using NX Manager (internal name). |
| int * (整数型指针) | n_attributes | Output(输出) | Count of attributes returned. |
| UF_ATTR_part_attr_p_t * | attributes | Output to be freed 输出并释放 | Allocated array of structures holding attribute titles and values. This must be freed by the caller using UF_free. |
UF_ATTR_assign (查看源代码)
定义在: uf_attr.h
概述
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.
环境
内部和外部
参见
Refer to the
example .
This example function assigns user-defined object attributes to an object.
需要许可证(S)
gateway (UG入口基本模块,Gateway是所有其它Uuigraphics模块的一个必要条件)
int UF_ATTR_assign
(
tag_t object,
char * title,
UF_ATTR_value_t value
)
| tag_t (tag_t类型) | object | Input(输入) | Part tag or part attribute tag. |
| char * (字符型指针) | title | Input(输入) | Attribute Title (maximum character length is UF_ATTR_MAX_TITLE_LEN+1) |
| UF_ATTR_value_t | value | Input(输入) | Typed Attribute Value |
UF_ATTR_count_attributes (查看源代码)
定义在: uf_attr.h
概述
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.
环境
内部和外部
需要许可证(S)
gateway (UG入口基本模块,Gateway是所有其它Uuigraphics模块的一个必要条件)
int UF_ATTR_count_attributes
(
tag_t object,
int type,
int * count
)
| tag_t (tag_t类型) | object | Input(输入) | Part tag or object tag. |
| int (整数型) | type | Input(输入) | Attribute Type: UF_ATTR_integer UF_ATTR_real, UF_ATTR_time UF_ATTR_null, UF_ATTR_string UF_ATTR_any UF_ATTR_reference |
| int * (整数型指针) | count | Output(输出) | Attribute Count |
UF_ATTR_cycle (查看源代码)
定义在: uf_attr.h
概述
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.
环境
内部和外部
参见
Sample program ufx_cycle_internal.c
需要许可证(S)
gateway (UG入口基本模块,Gateway是所有其它Uuigraphics模块的一个必要条件)
int UF_ATTR_cycle
(
tag_t object,
int * indx,
int type,
char * title,
UF_ATTR_value_p_t value
)
| tag_t (tag_t类型) | object | Input(输入) | Part tag or object tag. |
| int * (整数型指针) | indx | Input / Output | Cycle Status:(input) 0 = Begin Cycling Cycle Status:(output) 0 = Done Cycling or No Attribute Returned 1 = Next Attribute Returned |
| int (整数型) | type | Input(输入) | Attribute 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 * (字符型指针) | title | Output(输出) | Attribute Title (maximum character length is UF_ATTR_MAX_TITLE_LEN+1) |
| UF_ATTR_value_p_t | value | Input / Output | Typed 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 (查看源代码)
定义在: uf_attr.h
概述
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.
环境
内部和外部
需要许可证(S)
gateway (UG入口基本模块,Gateway是所有其它Uuigraphics模块的一个必要条件)
int UF_ATTR_delete
(
tag_t object,
int type,
char * title
)
| tag_t (tag_t类型) | object | Input(输入) | Part tag or part attribute tag. |
| int (整数型) | type | Input(输入) | Attribute Type: UF_ATTR_integer UF_ATTR_real, UF_ATTR_time UF_ATTR_null, UF_ATTR_string UF_ATTR_any UF_ATTR_reference |
| char * (字符型指针) | title | Input(输入) | Attribute Title (maximum character length is UF_ATTR_MAX_TITLE_LEN+1) |
UF_ATTR_delete_all (查看源代码)
定义在: uf_attr.h
概述
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.
环境
内部和外部
需要许可证(S)
gateway (UG入口基本模块,Gateway是所有其它Uuigraphics模块的一个必要条件)
int UF_ATTR_delete_all
(
tag_t object,
int type
)
| tag_t (tag_t类型) | object | Input(输入) | Part tag or part attribute tag. |
| int (整数型) | type | Input(输入) | Attribute 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 (查看源代码)
定义在: uf_attr.h
概述
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.
环境
内部和外部
需要许可证(S)
gateway (UG入口基本模块,Gateway是所有其它Uuigraphics模块的一个必要条件)
int UF_ATTR_find_attribute
(
tag_t object,
int type,
char * title,
int * title_type
)
| tag_t (tag_t类型) | object | Input(输入) | Part tag or object tag. |
| int (整数型) | type | Input(输入) | Attribute Type: UF_ATTR_integer UF_ATTR_real, UF_ATTR_time UF_ATTR_null, UF_ATTR_string UF_ATTR_any UF_ATTR_reference |
| char * (字符型指针) | title | Input(输入) | Attribute Title (maximum character length is UF_ATTR_MAX_TITLE_LEN+1) |
| int * (整数型指针) | title_type | Output(输出) | Type 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 (查看源代码)
定义在: uf_attr.h
概述
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.
环境
内部和外部
参见
需要许可证(S)
gateway (UG入口基本模块,Gateway是所有其它Uuigraphics模块的一个必要条件)
int UF_ATTR_read_value
(
tag_t object,
char * title,
int type,
UF_ATTR_value_p_t value
)
| tag_t (tag_t类型) | object | Input(输入) | Part tag or object tag. |
| char * (字符型指针) | title | Input(输入) | Attribute Title (maximum character length is UF_ATTR_MAX_TITLE_LEN+1) |
| int (整数型) | type | Input(输入) | Attribute 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_t | value | Input / Output to be freed | 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_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. |