UF_PART_ask_nth_history
Defined in: uf_part.h
int UF_PART_ask_nth_history(UF_PART_history_list_p_t history_list, int index, char * * program, char * * user, char * * machine, int * version, int * gmtime )
overview 概述
Returns the information about a particular save history from the given history list object.
The history_list parameter must be a UF_PART_history_list_p_t variable which has been created by UF_PART_create_history_list and filled in with UF_PART_ask_part_history.
The index parameter defines which "save" is being inquired upon and may range from 0 to num - 1, where num is the number of histories as returned by UF_PART_ask_num_histories. The histories are stored in reverse chronological order (most recent history first, at index=0).
The first history is also special in that it represents when the part was loaded in this session, as opposed to the other histories which represent when the part was saved.
The program, user, and machine variables have stored in them the addresses of strings (char variables) representing the program, user, and machine type for the requested "save" of the part. These addresses are actually the addresses within the history_list object of these values and should NOT be modified or freed by the caller of this routine. If you wish to modify the values returned for these variables, use strcpy to copy them and then manipulate the copies.
从给定的历史记录列表对象返回有关特定保存历史记录的信息。History _ list 参数必须是 UF _ Part _ history _ list _ p _ t 变量,该变量由 UF _ Part _ create _ history _ list 创建,并用 UF _ Part _ ask _ part _ history 填充。Index 参数定义要查询的“ save”,范围从0到 num-1,其中 num 是 UF _ Part _ ask _ num _ history 返回的历史记录数。历史记录按照相反的时间顺序存储(首先是最近的历史记录,索引 = 0)。第一个历史记录也很特殊,因为它表示的是在这个会话中加载该部分的时间,而不是表示保存该部分的时间的其他历史记录。程序、用户和机器变量在其中存储了表示程序、用户和机器类型的字符串(char 变量)的地址,用于请求的零件“保存”。这些地址实际上是这些值的 history _ list 对象中的地址,这个例程的调用者不应该修改或释放这些地址。如果希望修改这些变量返回的值,请使用 strcpy 复制它们,然后操作这些副本。
UFUN例子
获取源码例子请搜索 里海NX二次开发3000例专栏
parameters 参数
| UF_PART_history_list_p_t | history_list | Input | Address of a history list object which contains the save information for a part (obtained by UF_PART_ask_part_history). 包含部件保存信息的历史列表对象的地址(由 UF _ Part _ ask _ part _ history 获得)。 |
| int | index | Input | Index (starting at zero) of the particular part save for which information is requested. 请求信息的特定部分的索引(从零开始)。 |
| char * * | program | Output | Address of a pointer to a character (char ) variable into which is stored the address of the name of the program which saved this version of the part. 指向一个字符(字符)变量的指针的地址,这个字符(字符)变量中存储了保存这个版本零件的程序的名称的地址。 |
| char * * | user | Output | Address of a pointer to a character (char ) variable into which is stored the address of the name of the user who saved this version of the part. 指向字符(char)变量的指针的地址,其中存储了保存该部件版本的用户的名称的地址。 |
| char * * | machine | Output | Address of a pointer to a character (char ) variable into which is stored the address of the name of the machine type on which this version of the part was saved. 指向字符(char)变量的指针的地址,该字符(char)变量中存储了保存该部件版本的计算机类型的名称的地址。 |
| int * | version | Output | Address of an int variable into which is stored the version number associated with this version of the part. 整型变量的地址,其中存储与该部件的此版本相关联的版本号。 |
| int * | gmtime | Output | Address of an int variable into which is stored the time associated with the requested "save" of the part. This value is the number of seconds since January 1, 1970 12:00 AM GMT. See the routines in the standard UNIX time.h include file for routines to manipulate and display time values. 整型变量的地址,该变量存储与所请求的零件“保存”相关的时间。该值是自1970年1月1日格林尼治时间上午12:00以来的秒数。查看标准 UNIX time.h include 文件中的例程,了解操作和显示时间值的例程。 |