UF_UGMGR_invoke_pdm_server
Defined in: uf_ugmgr.h
int UF_UGMGR_invoke_pdm_server(int input_code, char * input_string, int * output_code, char * * output_string )
overview 概述
Passes program control to Team Center Engineering, thereby allowing you to make Team Center Engineering ITK calls. When the Open API UF_UGMGR_invoke_pdm_server is called, it makes a call to the function USER_invoke_pdm_server the Team Center Engineering user exit shared library. Note the difference between these function names.
In your ITK program, the USER_invoke_pdm_server() function should contain all the ITK functions to implement the required functionality. The function should be linked into the shared library libuser_exits.sl. Refer to the Information Manager Integration Tool Kit Reference Manual for additional information about implementing these ITK functions using User Exits.
The required prototype for the function USER_invoke_pdm_server() is:
extern void USER_invoke_pdm_server( int input_code, char input_string, int output_code, char output_string);
The USER_invoke_pdm_server() ITK function has the same arguments as the UF_UGMGR_invoke_pdm_server Open API function.
The output_string argument must be allocated in the ITK function USER_invoke_pdm_server() using the C programming language malloc() function, and freed in the UF_UGMGR_invoke_pdm_server Open API code by calling UF_free().
The input_code argument to USER_invoke_pdm_server can be used as a switch, so that you may call a different ITK function depending upon the value of input_code. When the USER_invoke_pdm_server function terminates, program control returns back from your ITK program to your Open API program. You may specify two arguments to return to your Open API program - an integer output_code and a string output_string.
Suppose that you have na Open API program from which you wish to call an Team Center Engineering ITK program. The ITK program takes a part number as input, and returns the date that the part was created or the date it was modified, depending upon the value of the input_code argument to the function USER_invoke_pdm_server(). This could be implemented as follows:
The Open API program asks the user for a part number, and then calls the Open API UF_UGMGR_invoke_pdm_server(), that passes control to the ITK function USER_invoke_pdm_server(). The values returned from this ITK function are printed.
将程序控制传递给 TeamCenter 工程,从而允许您调用 TeamCenter 工程 ITK。当调用 Open API UF _ UGMGR _ inv_ pdm _ server 时,它将调用函数 USER _ emon _ pdm _ server TeamCenter Engineering 用户退出共享库。请注意这些函数名之间的区别。在您的 ITK 程序中,USER _ call _ pdm _ server ()函数应该包含实现所需功能的所有 ITK 函数。该函数应该链接到共享库 libuser _ exit。Sl.有关使用用户出口实现这些 ITK 功能的更多信息,请参考信息管理器集成工具包参考手册。函数 USER _ call _ pdm _ server ()所需的原型是: externvoid USER _ 呼叫 _ pdm _ server (int input _ code,char input _ string,int output _ code,char output _ string) ; USER _ 呼叫 _ pdm _ server () ITK 函數具有与 UF _ UGMGR _ 呼叫 _ pdm _ server Open API 函數相同的參數。Output _ string 参数必须使用 C 编程语言 malloc ()函数在 ITK 函数中分配,并通过调用 UF _ free ()在 UF _ UGMGR _ 呼叫 _ pdm _ server Open API 代码中释放。可以使用 USER _ call _ pdm _ server 的 input _ code 参数作为开关,这样就可以根据 input _ code 的值调用不同的 ITK 函数。当 USER _ access _ pdm _ server 函数终止时,程序控制从您的 ITK 程序返回到您的 Open API 程序。您可以指定两个参数返回到 Open API 程序-一个整数 output _ code 和一个字符串 output _ string。假设您有一个 OpenAPI 程序,您希望从该程序调用 TeamCenter Engineering ITK 程序。ITK 程序接受一个部件编号作为输入,并根据 input _ code 参数的值返回创建该部件的日期或修改该部件的日期。这可以实现如下: Open API 程序请求用户输入一个零件编号,然后调用 Open API UF _ UGMGR _ call _ pdm _ server () ,该函数将控制传递给 ITK 函数 USER _ call _ pdm _ server ()。将打印此 ITK 函数返回的值。
UFUN例子
获取源码例子请搜索 里海NX二次开发3000例专栏
parameters 参数
| int | input_code | Input | User defined input code passed to your Team Center Engineering ITK function USER_invoke_pdm_server(). 用户定义的输入代码传递到 TeamCenter Engineering ITK 函数 USER _ 調 _ pdm _ server ()。 |
| char * | input_string | Input | User defined input string passed to your Team Center Engineering ITK function USER_invoke_pdm_server(). 用户定义的输入字符串传递给 TeamCenter Engineering ITK 函数 USER _ 叫 _ pdm _ server ()。 |
| int * | output_code | Output | User defined return code that is returned from the Team Center Engineering ITK USER_invoke_pdm_server() function on completion of ITK calls. 用户定义的返回代码,在完成 ITK 调用时从 TeamCenter Engineering ITK USER _ call _ pdm _ server ()函数返回。 |
| char * * | output_string | Output to UF_free | User defined string that is returned from the Team Center Engineering ITK USER_invoke_pdm_server() function on completion of ITK calls. This output string will be allocated by your ITK program, and must be freed by your Open API program by calling UF_free(). 用户定义的字符串,在完成 ITK 调用时从 TeamCenter Engineering ITK USER _ 呼叫 _ pdm _ server ()函數返回。这个输出字符串将由您的 ITK 程序分配,并且必须通过调用 UF _ free ()由 Open API 程序释放。 |