uc4400 (查看源代码)
定义在: uf.h
概述
Select the listing device. The listing device can be set to a file,
the listing window, or both file and listing window. The listing
device can also be set to no output.
返回
0 = Success
2 = Listing device is unavailable
otherwise an error code
环境
Internal and External
参见
需要许可证(S)
gateway (UG入口基本模块,Gateway是所有其它Uuigraphics模块的一个必要条件)
int uc4400
(
int listing_device,
char * file_spec,
int ip3
)
int (整数型) | listing_device | Input(输入) | The listing device to use: = 0 standard listing window = 4 output to a file = 8 output to both file and listing window = 9 No output is written |
char * (字符型指针) | file_spec | Input(输入) | This is only used for output to a file. This is the file specification for the output file, and must be less than UF_CFI_MAX_PATH_NAME_LEN characters. |
int (整数型) | ip3 | Input(输入) | This is no longer used. |
uc4403 (查看源代码)
定义在: uf.h
概述
uc4403 write character string to listing device set by call to uc4400
if you only need to write to the listing window
(as opposed to a listing device set by uc4400)
this function may be replaced with UF_UI_write_listing_window
需要许可证(S)
gateway (UG入口基本模块,Gateway是所有其它Uuigraphics模块的一个必要条件)
uc4404 (查看源代码)
定义在: uf.h
概述
uc4404 write character string and integer to listing device set by uc4400
if you only need to write the data to the listing window
(and not a particular device set by uc4400)
this function may be replaced by UF_UI_write_listing_window
需要许可证(S)
gateway (UG入口基本模块,Gateway是所有其它Uuigraphics模块的一个必要条件)
int uc4404
(
char * cp1,
int ip2
)
char * (字符型指针) | cp1 | | |
int (整数型) | ip2 | | |
uc4406 (查看源代码)
定义在: uf.h
概述
uc4406 write character string and real to listing device set by uc4400
if you only need to write the data to the listing window
(and not a particular listing device set by uc4400)
this function may be replaced by UF_UI_write_listing_window
需要许可证(S)
gateway (UG入口基本模块,Gateway是所有其它Uuigraphics模块的一个必要条件)
int uc4406
(
char * cp1,
double rp2
)
char * (字符型指针) | cp1 | | |
double (实数型) | rp2 | | |
uc4409 (查看源代码)
定义在: uf.h
概述
Query the current disposition of the listing device.
环境
Internal and External
Returns
0 = Listing device is set to the listing window
4 = Listing device is set to a file
8 = Listing device is set to both file and the listing window
9 = Listing device is set to NULL
otherwise the return is an error code.
参见
需要许可证(S)
gateway (UG入口基本模块,Gateway是所有其它Uuigraphics模块的一个必要条件)
int uc4409
(
char * file_name,
int * ir3
)
char * (字符型指针) | file_name | Output(输出) | For return code 4 or 8, this is the file specification of the listing device file. |
int * (整数型指针) | ir3 | Output(输出) | Unused. |
uf3192 (查看源代码)
定义在: uf.h
概述
Query the current NX Open program environment
环境
Internal and External
Returns
Void
需要许可证(S)
gateway (UG入口基本模块,Gateway是所有其它Uuigraphics模块的一个必要条件)
int * (整数型指针) | ir1 | Output(输出) | The environment that the NX Open program is running in. 0 is External Open, 1 is Internal Open. |
uf4401 (查看源代码)
定义在: uf.h
概述
uf4401 opens the listing device set by uc4400 for output
if you only need to open the listing window for output
(and not a particular listing device set by uc4400)
this function may be replaced with UF_UI_open_listing_window
需要许可证(S)
gateway (UG入口基本模块,Gateway是所有其它Uuigraphics模块的一个必要条件)
uf4402 (查看源代码)
定义在: uf.h
概述
uf4402 closes listing device set by uc4400
if you only need to close the listing window
(and not a particular device set by uc4400)
this function may be replaced by UF_UI_close_listing_window
需要许可证(S)
gateway (UG入口基本模块,Gateway是所有其它Uuigraphics模块的一个必要条件)
UF_add_callback_function (查看源代码)
定义在: uf.h
概述
Registers the callback to be called whenever the reason specified
occurs within NX.
Please note the following:
Once a routine is registered as a callback, the shared library it
resides in should not be unloaded until it is deregistered.
The callback function must call UF_initialize and UF_terminate, if
it makes any Open C function calls
The callback function receives three arguments:
argument 1 - The reason the callback has been called
argument 2 - A pointer to the part tag that caused the callback.
argument 3 - A user supplied pointer. Typically this will be a
structure pointer of data that the callback function
will need.
The callback will be called towards the end of the processing for that
particular reason. For example, the callback registered against
UF_create_part_reason will be called when a new part is created, after
almost all the process of creating this new part is completed.
The only exception to the above is UF_close_part_reason, for which
the callback will be called at the beginning of closing the part.
NOTE: For the new and open part reasons the callback is run at a time
when the newly created or opened part has not been set as the work part.
环境
内部和外部
参见
历史
V16 was changed to require the callback to call UF_initialize
需要许可证(S)
gateway (UG入口基本模块,Gateway是所有其它Uuigraphics模块的一个必要条件)
int UF_add_callback_function
(
UF_callback_reason_e_t reason,
UF_callback_fn_t fn,
void * user_data,
UF_registered_fn_p_t * function_id
)
UF_callback_reason_e_t | reason | Input(输入) | Reason to call callback |
UF_callback_fn_t | fn | Input(输入) | Function to call. Note this function must call UF_initialize if it makes any Open C function calls. It should also call UF_terminate. |
void * | user_data | Input(输入) | User data. This pointer will be passed to your callback function as the third argument. It will typically be a structure pointer with information that your callback function will require. |
UF_registered_fn_p_t * | function_id | Output(输出) | Identifier to use to remove callback |
UF_allocate_memory (查看源代码)
定义在: uf.h
概述
Allocates a block of storage and returns a pointer to it. Use UF_free
to free the allocated memory when no longer required.
返回
void - a pointer to the block of storage, aligned so
that any data type can be stored in it.
when error occur or nbytes = 0, a NULL pointer
is returned
环境
Internal and External
历史
This function was originally released in V15.0
需要许可证(S)
gateway (UG入口基本模块,Gateway是所有其它Uuigraphics模块的一个必要条件)
void * UF_allocate_memory
(
unsigned int nbytes,
int * error_code
)
unsigned int | nbytes | Input(输入) | The number of bytes to be allocated. If 0, NULL is returned |
int * (整数型指针) | error_code | Output(输出) | NX standard error code 0 success !=0 failure |
UF_ask_application_module (查看源代码)
定义在: uf.h
概述
Returns the current application module. The value that is returned
maps to a string defined constant. You can find the string in the
header file uf.h. The strings are of the form UF_APP_<module>.
For example, UF_APP_DRAFTING represents the drafting module.
Note - if this function is called from an external program it will
always return a FALSE and an app id of APP_NONE.
环境
内部和外部
需要许可证(S)
gateway (UG入口基本模块,Gateway是所有其它Uuigraphics模块的一个必要条件)
int UF_ask_application_module
(
int * module_id
)
int * (整数型指针) | module_id | Output(输出) | The module identification value of the current application. |
UF_ask_codeset (查看源代码)
定义在: uf.h
概述
Returns the code set identifier supported by a machine. The code set
identifier can be any one of the enumerated constants in UF_codeset_e.
环境
内部和外部
参见
需要许可证(S)
gateway (UG入口基本模块,Gateway是所有其它Uuigraphics模块的一个必要条件)
int UF_ask_codeset
(
UF_codeset_t * codeset
)
UF_ask_grip_args (查看源代码)
定义在: uf_ugopenint.h
概述
This routine is used to receive arguments from a grip program. The
grip program sets up these arguments with the GRIP command, GRARGS.
The GRIP program then invokes execution of the internal Open API program
with the GRIP XSPAWN command. The Open API program, during execution,
maintains complete control of the system including any interactive
statements or error messages.
To receive the arguments from GRIP, define the structure, UF_args_s, that
describes the arguments to share with the GRIP program. This definition
must match the definition supplied to the GRIP GRARGS command so that the
contents of the GRIP variables can be copied to the contents of the Open
API variables.
Please note the following limitations:
. The GRARGS command is limited to 103 arguments.
. The size of character strings input to UF_ask_grip_args should be
declared to the largest GRIP string (132 characters) plus a null
character or 133 characters.
. Calls cannot be nested. For example, a sequence where GRIP XPAWNs an
internal Open API program which uses UF_call_grip to execute GRIP,
and anything similar, is not allowed.
环境
Internal
参见
需要许可证(S)
gateway (UG入口基本模块,Gateway是所有其它Uuigraphics模块的一个必要条件)
int UF_ask_grip_args
(
int argument_count,
UF_args_p_t gruf_arg_list
)
int (整数型) | argument_count | Input(输入) | Count of arguments from GRIP executable |
UF_args_p_t | gruf_arg_list | Input / Output | The data arguments from GRIP. An array of structures where each element in the array is a structure that contains an arguments type, size, and address. The actual values will be modified by this call. |
UF_ask_syslog_filename (查看源代码)
定义在: uf.h
概述
Get name of the current syslog
环境
Internal and External
历史
Released in NX2.0.5
需要许可证(S)
gateway (UG入口基本模块,Gateway是所有其它Uuigraphics模块的一个必要条件)
int UF_ask_syslog_filename
(
char * * filename
)
char * * | filename | Output to be freed 输出并释放 | pointer to dynamically allocated path filename must be freed with UF_free() |
UF_ask_system_info (查看源代码)
定义在: uf.h
概述
Get the information about an Open C Program
This routine can be used to gather the system information of an Open C
program, like the machine name, Operating System information etc., and is
useful in benchmarking, where you want to record the information about
the machine the benchmark was run on.
This routine outputs the data through the structure UF_system_info_t.
Once the data is no longer needed, the memory allocated to the fields
of this structure should be freed by a corresponding call to the routine
UF_free_system_info.
环境
Internal and External
参见
历史
Released in V18.0, modified in NX 6.0 to return used bundles
需要许可证(S)
gateway (UG入口基本模块,Gateway是所有其它Uuigraphics模块的一个必要条件)
int UF_ask_system_info
(
UF_system_info_p_t info
)
UF_system_info_p_t | info | Output to be freed 输出并释放 | structure to hold the process information. The allocated fields should be freed by calling UF_free_system_info |
UF_begin_timer (查看源代码)
定义在: uf.h
概述
Start a timer.
This routine can be used to gather timing information about an Open C
program, and is useful in benchmarking. This routine will start a timer.
The timer will be stopped with a corresponding call to UF_end_timer.
More than one timer can be active at any time, this is useful when you
have one overall timer, and then several sub-timers timing individual
sub-operations.
环境
内部和外部
参见
历史
Released in V18.0
需要许可证(S)
gateway (UG入口基本模块,Gateway是所有其它Uuigraphics模块的一个必要条件)
int UF_begin_timer
(
UF_timer_p_t timer
)
UF_call_grip (查看源代码)
定义在: uf.h
概述
Calls and executes a GRIP program. Your GRIP program must be written,
compiled, linked, and ready to run.
While a GRIP program executes, it can have access to an Open C API function
arguments and their contents. Argument passing to the GRIP program occurs
through UFARGS. After GRIP program termination, the Open C API program has
access to any assignments made by the GRIP program. The GRIP program
completes its execution and then UF_call_grip outputs a return value.
Note: If the path is omitted in the grip_executable string passed to
UF_call_grip, NX will look in the current directory for the grip program.
It will not look in the directory of the ufunc program or use any
environment variables, including UGII_INITIAL_GRIP_DIR, to search for the
GRIP program.
UF_translate_variable can be used to extract an environment variable and
concatenate it with the program name.
The following GRIP commands are not
supported in External mode when calling GRIP:
ALL OF GRIP NC
PLNOTE EDTXHT CHAIN
BLANK UNBLNK RVBLNK
If any of these commands are encountered, an error is written to the
batch log file.
环境
内部和外部
参见
需要许可证(S)
gateway (UG入口基本模块,Gateway是所有其它Uuigraphics模块的一个必要条件)
int UF_call_grip
(
char * grip_executable,
int count,
UF_args_p_t UFARGS
)
char * (字符型指针) | grip_executable | Input(输入) | Name of GRIP program to execute (file name or full path name). |
int (整数型) | count | Input(输入) | Count of arguments to pass to GRIP executable |
UF_args_p_t | UFARGS | Input(输入) | An array of structures where each element in the array is a structure that contains an arguments type, size, and address. Note that if an argument is type UF_TYPE_CHAR, the array must be initialized prior to the UF_call_grip call. |
UF_decode_auth_file (查看源代码)
定义在: uf.h
概述
Decodes an input authorization file using an integer key value that
matches the original key for perturbation.
环境
Internal
需要许可证(S)
gateway (UG入口基本模块,Gateway是所有其它Uuigraphics模块的一个必要条件)
int UF_decode_auth_file
(
int key,
char * input_file,
void * * out_mem
)
int (整数型) | key | Input(输入) | Integer valued key for decoding the input file |
char * (字符型指针) | input_file | Input(输入) | Input authorization file to decode |
void * * | out_mem | Output to be freed 输出并释放 | Pointer to decoded contents of the authorization file. Use UF_free to deallocate the memory. |
UF_encode_auth_file (查看源代码)
定义在: uf.h
概述
Encodes an input authorization file using an integer value for
perturbation.
环境
Internal
需要许可证(S)
gateway (UG入口基本模块,Gateway是所有其它Uuigraphics模块的一个必要条件)
int UF_encode_auth_file
(
int key,
char * input_file,
char * output_file
)
int (整数型) | key | Input(输入) | Value used to perturb the input file |
char * (字符型指针) | input_file | Input(输入) | Input authorization file name |
char * (字符型指针) | output_file | Input(输入) | Output encoded authorization file name |
UF_end_timer (查看源代码)
定义在: uf.h
概述
Stop the timer and get the timer values
This routine is used to gather timing information about an Open C program,
and is useful in benchmarking. This routine will stop the timer created by
a corresponding UF_begin_timer call, and output the timing information in
the structure UF_timer_values_t.
环境
内部和外部
参见
历史
Released in V18.0
需要许可证(S)
gateway (UG入口基本模块,Gateway是所有其它Uuigraphics模块的一个必要条件)
int UF_end_timer
(
UF_timer_t timer,
UF_timer_values_p_t values
)
UF_find_all_subdirectories (查看源代码)
定义在: uf.h
概述
Find all subdirectories of a given name in the directories specified in
the file custom_dirs.dat and ug_custom_dirs.dat. Since the same
subdirectory may be in multiple directories, an array of path names
will be returned. As an example searching for the subdirectory "startup"
will return almost all of the directories, since this is a standard
subdirectory.
环境
Internal and External
参见
历史
Released in NX 1.0
需要许可证(S)
gateway (UG入口基本模块,Gateway是所有其它Uuigraphics模块的一个必要条件)
int UF_find_all_subdirectories
(
const char * subdirectory,
int * num_found,
char * * * path
)
const char * | subdirectory | Input(输入) | The subdirectory to look for. |
int * (整数型指针) | num_found | Output(输出) | The number of subdirectories found. |
char * * * | path | Output to be freed 输出并释放 | The list of subdirectories found. This must be freed by calling UF_free_string_array. |
UF_find_file (查看源代码)
定义在: uf.h
概述
Find a given subdirectory and file. This routine will traverse all the
directories specified in the file custom_dirs.dat and ug_custom_dirs.dat
looking for the file specified by the given subdirectory and filename.
This routine will return the first file found.
环境
Internal and External
参见
历史
Released in NX 1.0
需要许可证(S)
gateway (UG入口基本模块,Gateway是所有其它Uuigraphics模块的一个必要条件)
int UF_find_file
(
const char * subdirectory,
const char * filename,
char * * path
)
const char * | subdirectory | Input(输入) | The subdirectory in which to look for the given file. |
const char * | filename | Input(输入) | The filename to look for, including any extension. |
char * * | path | Output to be freed 输出并释放 | The filename found. If no file is found, path will be NULL. The path must be freed by calling UF_free. |
UF_free (查看源代码)
定义在: uf.h
概述
Frees the memory allocated and returned by an Open C API routine.
返回
void
环境
内部和外部
需要许可证(S)
gateway (UG入口基本模块,Gateway是所有其它Uuigraphics模块的一个必要条件)
void UF_free
(
void * data
)
void * | data | Input(输入) | Pointer to data item to free |
UF_free_string_array (查看源代码)
定义在: uf.h
概述
Frees the memory allocated for an array of pointers and frees the
strings within the array. You must pass in the number of pointer in
the array. Various Open C API routines malloc space for an array
of pointers, and then allocate space for each of the pointers.
返回
void
环境
内部和外部
需要许可证(S)
gateway (UG入口基本模块,Gateway是所有其它Uuigraphics模块的一个必要条件)
void UF_free_string_array
(
int n_strings,
char * * string_array
)
int (整数型) | n_strings | Input(输入) | number of pointers |
char * * | string_array | Input(输入) | n_strings pointer to the array of pointers to free |
UF_free_system_info (查看源代码)
定义在: uf.h
概述
Free the fields of the structure UF_system_info_t, containing the process
information
This structure is filled earlier by a call to the routine UF_ask_system_info
环境
Internal and External
参见
历史
Released in V18.0
需要许可证(S)
gateway (UG入口基本模块,Gateway是所有其它Uuigraphics模块的一个必要条件)
int UF_free_system_info
(
UF_system_info_p_t info
)
UF_get_customer_default (查看源代码)
定义在: uf.h
概述
This routine retrieves a customer default value from the database.
There are several different conditions that can arise from querying
the database:
1) The record was found and its units match. The function
returns SUCCESS(1)
2) The record was not found. If units given was ENGLISH or METRIC
nothing is returned and the function returns a FAILED(0). If
the units given was NONE a second and/or third attempt is made
with units ENGLISH THEN METRIC used instead. The results of
these attempts can be any of the conditions outlined above.
If you specify either METRIC or ENGLISH for units, this function
automatically appends _MU or _EU to the input name. For example, if you
specify METRIC and input the name "UG_gridSpacingY", the function searches
for "UG_gridSpacingY_MU".
If you specify NONE for units, the function searches for the name
as specified. If the name is not found it searches again with _EU
appended to the name. If the name is still not found, then it
appends _MU to the name for its final search.
返回
return code:
0 = Success
1 = Record not found
<0 or >1 = Use UF_get_fail_message to get error.
环境
内部和外部
参见
需要许可证(S)
gateway (UG入口基本模块,Gateway是所有其它Uuigraphics模块的一个必要条件)
int UF_get_customer_default
(
char * name,
int units,
char * * default_value
)
char * (字符型指针) | name | Input(输入) | Name of Module ID and default |
int (整数型) | units | Input(输入) | Units are enumerated as follows: 0 = NONE 1 = METRIC 2 = ENGLISH |
char * * | default_value | Output to be freed 输出并释放 | String containing default value. If default_value is NULL then the value was not found or an error occurred. Use UF_free to deallocate memory when no longer required. |
UF_get_fail_message (查看源代码)
定义在: uf.h
概述
Returns the message string associated with an error code.
环境
内部和外部
需要许可证(S)
gateway (UG入口基本模块,Gateway是所有其它Uuigraphics模块的一个必要条件)
int UF_get_fail_message
(
int fail_code,
char message [ 133 ]
)
int (整数型) | fail_code | Input(输入) | the failure code to translate |
char | message [ 133 ] | Output(输出) | the message corresponding to the fail code |
UF_get_release (查看源代码)
定义在: uf.h
概述
Returns the current major release version number. For example, if
you call this function from V10.4.1, it returns V10.4. You must use
UF_free to deallocate space used by release.
环境
内部和外部
需要许可证(S)
gateway (UG入口基本模块,Gateway是所有其它Uuigraphics模块的一个必要条件)
int UF_get_release
(
char * * release
)
char * * | release | Output to be freed 输出并释放 | Major release version number |
UF_get_reserved_licenses (查看源代码)
定义在: uf.h
概述
Returns the licenses that are currently reserved against a context.
This method will also output the licenses reserved against the default context in the syslog.
环境
内部和外部
需要许可证(S)
gateway (UG入口基本模块,Gateway是所有其它Uuigraphics模块的一个必要条件)
int UF_get_reserved_licenses
(
const char* context_name,
int * n_licenses,
char* * * licenses
)
const char* | context_name | Input(输入) | Name of context to release against. Will use the default context if NULL is specified. |
int * (整数型指针) | n_licenses | Output(输出) | The number of licenses. |
char* * * | licenses | Output to be freed 输出并释放 | The list of license reserved against the specified context. This must be freed by calling UF_free_string_array. |
UF_initialize (查看源代码)
定义在: uf.h
概述
Initializes the Open C API environment and allocates an Open C
API execute license. If you do not call UF_initialize, then subsequent
calls to Open C API fail with an error code of
UF_err_program_not_initialized. This function must be the first
function you call after you have declared your variables.
环境
内部和外部
参见
需要许可证(S)
gateway (UG入口基本模块,Gateway是所有其它Uuigraphics模块的一个必要条件)
UF_is_initialized (查看源代码)
定义在: uf.h
概述
Checks if the Open C API environment has been successfully
initialized.
返回
return code:
0 = Open C API is not initialized.
1 = Open C API has been properly
initialized.
环境
内部和外部
需要许可证(S)
gateway (UG入口基本模块,Gateway是所有其它Uuigraphics模块的一个必要条件)
int UF_is_initialized
(
void
)
UF_is_ugmanager_active (查看源代码)
定义在: uf.h
概述
Checks to see if an NX Manager process is
active. It returns true if NX Manager is active.
环境
内部和外部
需要许可证(S)
gateway (UG入口基本模块,Gateway是所有其它Uuigraphics模块的一个必要条件)
int UF_is_ugmanager_active
(
logical * is_active
)
logical * | is_active | Output(输出) | Returns true if NX Manager is active |
UF_load_library (查看源代码)
定义在: uf.h
概述
Loads the shared library specified by library_name and finds the entry
point specified by symbol_name in that library. The reference to the
specified entry point is output as a function pointer declared to accept
and return void (i.e. type UF_load_f_p_t).
For the entry point to be found on Windows NT, you must declare it with
the DllExport macro, e.g.
extern DllExport int my_function(...
without the DllExport, the name will not be exported. Since the DllExport
also works on Unix systems, the best practice is just to always use the
DllExport macro for routines you want exported.
If library_name is found but symbol_name is not, an appropriate error
code returns, but the loaded library may not be unloaded. The user
should call UF_unload_library to explicitly unload library_name on
failure, if appropriate.
To load a shared library into an external application - the library must
not be linked against any interactive libraries. This can be accomplished
by using the "-noui" option on Unix.
NOTE: UF_load_library is intended for function (i.e. "text" entry
point) lookup only. It should NOT be used for data symbol lookup.
环境
内部和外部
参见
需要许可证(S)
gateway (UG入口基本模块,Gateway是所有其它Uuigraphics模块的一个必要条件)
int UF_load_library
(
char * library_name,
char * symbol_name,
UF_load_f_p_t * function_ptr
)
char * (字符型指针) | library_name | Input(输入) | Name of shared library to load. |
char * (字符型指针) | symbol_name | Input(输入) | Name of symbol (function) to find. |
UF_load_f_p_t * | function_ptr | Output(输出) | Pointer to symbol (function) in library. |
UF_MISC_set_program_name (查看源代码)
定义在: uf.h
概述
Each part file has an internal history storage area where the program
name can be stored when the system saves the part file. This function
enables you to specify either the entire program name (External
mode) or append a name to the program name (Internal mode). You
should call this routine before you call UF_PART_open since it does
not set the program name on parts that are already opened. A utility
called ug_inspect enables you to read the program name stored in the
history area.
Interactively (Internal mode), when you are in NX, the program
name is the same as the string that appears in the window manager
banner of the main window (e.g. NX 3). In Internal
mode the name string that you specify is appended to this program
name. For example, if you specify IGES version 3.1 as the name
string to this routine, then the program name in the history would
look like: "NX 3IGES version 3.1".
In External mode, the program name is what you specify in the name
string. From our previous example this would be IGES version 3.1.
The limitation for the length of the name string depends on which
mode you are in, Internal or External. The maximum length of the
entire program name is 128 characters. In Internal mode, because the
name string is concatenated to the program name you are limited to
64 characters. In External mode, since the name string you specify
becomes the program name you are limited to 128 characters. In
either mode, if you specify a name that is to long, the name is
truncated to either 64 or 128 characters (Internal and External mode
respectively).
The internal history area is like a log file. If you resave the part file
with a different program a new history entry is added to the part file.
That is, the history grows larger. Thus you are likely to see two lines of
history if you have saved the part file twice and specified a name with
each save.
返回
void
环境
内部和外部
需要许可证(S)
gateway (UG入口基本模块,Gateway是所有其它Uuigraphics模块的一个必要条件)
void UF_MISC_set_program_name
(
const char * name
)
const char * | name | Input(输入) | Name of program to store in the internal history |
UF_print_syslog (查看源代码)
定义在: uf.h
概述
Output a message to the syslog.
This message can be used to print run time information about the NX Open
program to the syslog and is useful for state checking, validation and
debugging.
Printing the trace is especially useful while debugging and reporting a
problem.
环境
Internal and External
历史
Released in V18.0
需要许可证(S)
gateway (UG入口基本模块,Gateway是所有其它Uuigraphics模块的一个必要条件)
int UF_print_syslog
(
char * message,
logical trace
)
char * (字符型指针) | message | Input(输入) | Message to be output to the syslog |
logical | trace | Input(输入) | TRUE = Print the stack trace along with the message FALSE = Print only the message |
UF_reallocate_memory (查看源代码)
定义在: uf.h
概述
Reallocates a block of storage and returns a pointer to it. Use UF_free
to free the allocated memory when no longer required.
返回
void - a pointer to the block of storage, aligned so
that any data type can be stored in it.
when error occur or nbytes = 0, a NULL pointer
is returned
环境
Internal and External
历史
This function was originally released in V16.0
需要许可证(S)
gateway (UG入口基本模块,Gateway是所有其它Uuigraphics模块的一个必要条件)
void * UF_reallocate_memory
(
void * data,
unsigned int nbytes,
int * error_code
)
void * | data | Input(输入) | Pointer to previously allocated memory |
unsigned int | nbytes | Input(输入) | The number of bytes to be allocated. If 0, NULL is returned |
int * (整数型指针) | error_code | Output(输出) | NX standard error code |
UF_release (查看源代码)
定义在: uf.h
概述
Release a license against the specified license context.
环境
内部和外部
需要许可证(S)
gateway (UG入口基本模块,Gateway是所有其它Uuigraphics模块的一个必要条件)
int UF_release
(
const char* license,
const char* context_name
)
const char* | license | Input(输入) | License feature name to be released |
const char* | context_name | Input(输入) | Name of context to release license against. Will use the default context if NULL is specified. |
UF_release_all (查看源代码)
定义在: uf.h
概述
Release all licenses against the specified license context. If
the context specified is a user-defined context it will be deleted.
环境
内部和外部
需要许可证(S)
gateway (UG入口基本模块,Gateway是所有其它Uuigraphics模块的一个必要条件)
int UF_release_all
(
const char* context_name
)
const char* | context_name | Input(输入) | Name of context release to release. Will use the default context if NULL is specified. |
UF_remove_callback_function (查看源代码)
定义在: uf.h
概述
Deregisters the callback specified by the identifier.
环境
内部和外部
参见
需要许可证(S)
gateway (UG入口基本模块,Gateway是所有其它Uuigraphics模块的一个必要条件)
int UF_remove_callback_function
(
UF_registered_fn_p_t function_id
)
UF_registered_fn_p_t | function_id | Input(输入) | Identifier from UF_add_callback_function |
UF_reserve (查看源代码)
定义在: uf.h
概述
Reserve a license against the specified license context.
If the specified user-defined context does not already exist it will be created.
环境
内部和外部
需要许可证(S)
gateway (UG入口基本模块,Gateway是所有其它Uuigraphics模块的一个必要条件)
int UF_reserve
(
const char* license,
const char* context_name
)
const char* | license | Input(输入) | License feature name to be reserved |
const char* | context_name | Input(输入) | Name of context to reserve license against. Will use the default context if NULL is specified. |
UF_set_grip_args (查看源代码)
定义在: uf_ugopenint.h
概述
Updates the contents of the matching GRIP argument list with the
contents of the Open API addresses. This is used to return data
to the GRIP program.
环境
Internal
需要许可证(S)
gateway (UG入口基本模块,Gateway是所有其它Uuigraphics模块的一个必要条件)
int UF_set_grip_args
(
int argument_count,
UF_args_p_t gruf_arg_list
)
int (整数型) | argument_count | Input(输入) | Count of arguments to set in GRIP. |
UF_args_p_t | gruf_arg_list | Input(输入) | The arguments to set in GRIP. An array of structures where each element in the array is a structure that contains an arguments type, size, and address. |
UF_set_retiring_flag (查看源代码)
定义在: uf.h
概述
Set a flag that determines if an Open C executable will issue
warnings when a function that is scheduled to be retired is called.
This can be used to alert the NX Open programmer that modification to
their program is required.
When routines are planned to be removed from the NX Open interface, the
prototype will be moved to uf_retiring.h, along with a description of
what the NX Open programmer should do. A warning can be issued when
any of these routines are called by an NX Open application. This routine
allows the NX Open programmer to set the value of this flag.
This routine overrides the environment variable
UGII_USING_RETIRING_FUNCTIONS which can be set by the user to get
the same warnings. This routine is meant to be used when the programmer
wants to force a particular value for a program.
环境
Internal and External
历史
Released in V16.0
需要许可证(S)
gateway (UG入口基本模块,Gateway是所有其它Uuigraphics模块的一个必要条件)
int UF_set_retiring_flag
(
int value
)
int (整数型) | value | Input(输入) | 0 = Don't warn user at all, this is the default 1 = Output a single message if any function is called that is planned to be obsoleted 2 = Output a message for each function called that is planned to be obsoleted. The message will include the routine name, and the number of times called. |
UF_set_variable (查看源代码)
定义在: uf.h
概述
Sets an environment variable to the string specified in value. You must
supply the complete name of variable.
环境
内部和外部
参见
需要许可证(S)
gateway (UG入口基本模块,Gateway是所有其它Uuigraphics模块的一个必要条件)
int UF_set_variable
(
const char * variable,
const char * value
)
const char * | variable | Input(输入) | Environment Variable to set in Operating System |
const char * | value | Input(输入) | Value or equivalence string for the variable. |
UF_TAG_ask_handle_of_tag (查看源代码)
定义在: uf.h
概述
Return the persistent HANDLE for an object tag.
Multiple parts can be loaded into NX during a single session, and
the Tag (i.e. Object Identifier) cannot be guaranteed between sessions.
Consequently, "handles" were created to identify objects between sessions.
This handle is persistent between sessions.
返回
Returns name of handle for object tag. This return string must be freed
by calling UF_free.
环境
内部和外部
参见
需要许可证(S)
gateway (UG入口基本模块,Gateway是所有其它Uuigraphics模块的一个必要条件)
char * UF_TAG_ask_handle_of_tag
(
tag_t object_tag
)
tag_t (tag_t类型) | object_tag | Input(输入) | tag of object to query for persistent handle |
UF_TAG_ask_new_tag_of_entity (查看源代码)
定义在: uf.h
概述
Returns the new tag of the object corresponding to the known object
ID in the V9 part. This only works for the Object IDs of the last V9
part loaded into this session.
NOTE: This was renamed from UF_ask_new_tag_of_entity()
返回
New tag
环境
内部和外部
参见
需要许可证(S)
gateway (UG入口基本模块,Gateway是所有其它Uuigraphics模块的一个必要条件)
tag_t UF_TAG_ask_new_tag_of_entity
(
tag_t v9_eid
)
UF_TAG_ask_tag_of_handle (查看源代码)
定义在: uf.h
概述
Return the object tag of a persistent HANDLE.
返回
Returns object tag of object handle
环境
内部和外部
参见
需要许可证(S)
gateway (UG入口基本模块,Gateway是所有其它Uuigraphics模块的一个必要条件)
tag_t UF_TAG_ask_tag_of_handle
(
char * object_handle
)
char * (字符型指针) | object_handle | Input(输入) | Name of persistent handle |
UF_TAG_compose_handle (查看源代码)
定义在: uf.h
概述
Given the constituent parts of data manager, filename, subfile id and
version, this function returns the resulting handle.
环境
内部和外部
需要许可证(S)
gateway (UG入口基本模块,Gateway是所有其它Uuigraphics模块的一个必要条件)
int UF_TAG_compose_handle
(
const char * file_data,
unsigned int sub_file_id,
unsigned int version,
char * * handle
)
const char * | file_data | Input(输入) | Data about the file. This string would come from a call to UF_TAG_decompose_handle. |
unsigned int | sub_file_id | Input(输入) | sub_file identifier. The sub_file is an internal file in the part file database. |
unsigned int | version | Input(输入) | Version of part |
char * * | handle | Output to be freed 输出并释放 | String containing the composed handle |
UF_TAG_decompose_handle (查看源代码)
定义在: uf.h
概述
Given the handle, the constituent parts of data manager, filename, subfile
id and version are returned.
环境
内部和外部
参见
需要许可证(S)
gateway (UG入口基本模块,Gateway是所有其它Uuigraphics模块的一个必要条件)
int UF_TAG_decompose_handle
(
char * handle,
char * * file_data,
unsigned int * sub_file_id,
unsigned int * version
)
char * (字符型指针) | handle | Input(输入) | Handle to decompose |
char * * | file_data | Output to be freed 输出并释放 | Data about the file. This can be used by UF_TAG_compose_handle. This argument must be freed by calling UF_free. |
unsigned int * | sub_file_id | Output(输出) | Sub-file identifier for handle. The sub_file is an internal file in the part file database. |
unsigned int * | version | Output(输出) | Version of part in which handle is located. |
UF_TAG_register_event_cb (查看源代码)
定义在: uf.h
概述
Register a new tag event callback. All callbacks are called on all tags
for all events. This returns an identifier for the callback which is
used to allow it removal.
Please note the following items:
. The routines registered can not call any other Open C routines
In particular, the tag cannot be queried or edited in any way.
. The implementation of any routine so registered must be very
efficient as it is called many times.
. Recall that tags get reused. This means that the order of events is
important so the event is interpreted with respect to the right
"incarnation" of the tag.
环境
内部和外部
参见
历史
This function was originally released in V15.0.
需要许可证(S)
gateway (UG入口基本模块,Gateway是所有其它Uuigraphics模块的一个必要条件)
int UF_TAG_register_event_cb
(
UF_TAG_event_fn_t callback,
void * closure,
int * callback_id
)
UF_TAG_event_fn_t | callback | Input(输入) | Callback function |
void * | closure | Input(输入) | Pointer passed to callback on each call |
int * (整数型指针) | callback_id | Output(输出) | Identifier for callback |
UF_TAG_unregister_event_cb (查看源代码)
定义在: uf.h
概述
Unregister a previously registered callback.
环境
内部和外部
参见
历史
This function was originally released in V15.0.
需要许可证(S)
gateway (UG入口基本模块,Gateway是所有其它Uuigraphics模块的一个必要条件)
int UF_TAG_unregister_event_cb
(
int callback_id
)
int (整数型) | callback_id | Input(输入) | - identifier of callback |
UF_terminate (查看源代码)
定义在: uf.h
概述
Terminates the Open C API environment and deallocates a
Open C API execute license. If UF_terminate is not called, the
Open C API execute license may not be freed. Once UF_terminate
is called in an external Open C API program, the program should
exit. You should not attempt to call UF_initialize again and continue
operation.
Calling this method will release all licenses in the default context.
环境
内部和外部
参见
需要许可证(S)
gateway (UG入口基本模块,Gateway是所有其它Uuigraphics模块的一个必要条件)
UF_translate_variable (查看源代码)
定义在: uf.h
概述
Translates environment variables to their equivalence strings. You
must supply the complete name of the variable argument.
环境
内部和外部
参见
需要许可证(S)
gateway (UG入口基本模块,Gateway是所有其它Uuigraphics模块的一个必要条件)
int UF_translate_variable
(
const char * variable,
char * * translation
)
const char * | variable | Input(输入) | Environment Variable to Translate |
char * * | translation | Output(输出) | Translated variable name or NULL if nonexistent. |
UF_unload_library (查看源代码)
定义在: uf.h
概述
Unloads the shared library specified by library_name. UF_unload_library
unloads the library unconditionally, effectively invalidating all function
pointers previously set by calls to UF_load_library for the specified
library.
环境
内部和外部
参见
需要许可证(S)
gateway (UG入口基本模块,Gateway是所有其它Uuigraphics模块的一个必要条件)
int UF_unload_library
(
char * library_name
)
char * (字符型指针) | library_name | Input(输入) | Name of shared library to unload. |
ufusr (查看源代码)
定义在: uf_ugopenint.h
概述
Internal Open API Entry Point.
You use ufusr as a main function entry point for all Internal Open API
programs. The ufusr function may also be used for user exits.
For internal programs written in C, a third argument needs to be
passed into the "ufusr" function. This third variable is the length of the
character array param.
返回
void
环境
Internal
参见
void ufusr
(
char * param,
int * retcod,
int param_len
)
char * (字符型指针) | param | Input(输入) | If this function is called from menuscript, this argument will contain the name of the menu button selected. Otherwise this argument is unused. |
int * (整数型指针) | retcod | Output(输出) | Return Code. Not used by Internal Open API. |
int (整数型) | param_len | Input(输入) | Length of 'param' Argument. NX handles this input for you. |
ufusr_ask_unload (查看源代码)
定义在: uf_ugopenint.h
概述
User supplied routine to specify how an Internal Open API shared image
is handled upon exit. This function gives you the capability to unload an
internal Open API or user exit from NX. You can
specify any one of the three constants as a return value to
determine the type of unload to perform: immediately after Open
API execution, via an unload selection dialog, or when NX
terminates.
If you choose UF_UNLOAD_SEL_DIALOG, then you have the option to unload
your image by selecting File--Utilities--Unload Shared Image.
Please note the following restrictions:
A program which uses UF_UI_append_menubar_menu should not
use the option to unload an Open API image. Additionally, if
your code which defines UF_UI_append_menubar_menu itself
loads a shared library, this code should not attempt to unload the
library. NX always makes a strong attempt to prevent
unloading a library which was coded by using UF_UI_append_menubar_menu.
A shared library that contains registered functions, such as any of
the User Defined Object registration methods, should not be
unloaded. NX must keep the library loaded to access the
address of the registered function.
Additionally, you have the option of coding the cleanup routine
ufusr_cleanup to perform any house keeping chores that may need
to be performed. If you code the cleanup routine it is automatically
called by NX.
返回
UF_UNLOAD_IMMEDIATELY - unload immediately after Open API executes
UF_UNLOAD_SEL_DIALOG - via an unload selection dialog
UF_UNLOAD_UG_TERMINATE - when NX terminates
环境
Internal
参见
int ufusr_ask_unload
(
void
)
ufusr_cleanup (查看源代码)
定义在: uf_ugopenint.h
概述
User supplied routine to clean up before the user function program is
unloaded.
NX calls this entry point if it is defined in your source code.
The entry point is called immediately before a shared library is
unloaded and allows you to perform any cleanup tasks that must be
performed within NX. For example, if your internal program
opened up a database program you could use the call to
ufusr_cleanup as an opportunity to close any open database files
before the image is unloaded.
NOTE: You use ufusr_cleanup in conjunction with ufusr_ask_unload.
If you code ufusr_cleanup without defining ufusr_ask_unload, then
the ufusr_cleanup entry point is ignored.
返回
void
环境
Internal
参见
void ufusr_cleanup
(
void
)