kernelv_program_error_get_path
Prototype
[ret, program_path, length] | program_error_get_path(vnck: ctypes.CDLL); |
Description
Returns the program path used to start the active program.
If the program was started by the absolute specification of a file name, an empty string is returned; if the current active program is a manual block, “-” is returned (less the inverted commas).
A zero terminated string is returned. The number of returned bytes is returned in return_length, i.e. the terminating zero is included.
If the memory provided by the calling application is too small for the string to be returned, the return value ERR_CNC_RET_MEMORY is returned In this case, the length parameter contains the size in bytes required to return the string.
Parameter
Name | Type | Meaning |
vnck | ctypes.CDLL | Instance of the loaded KernelV DLL. |
Return values
Name | Type | Meaning |
ret | KERNELV_RETURN (int) | Return value of the native integrated C function. |
program_path | str | Path to the program. |
length | int (unsigned) | Actual length of the error message in bytes. |
KERNELV_RETURN
Symbol | Value | Meaning |
RET_FINISHED | 0 | The function was executed without error. |
ERR_CNC_RET_MEMORY | -4 | The return value(s) does/do not fit into the memory provided. The number of bytes required is returned in the ‘length’ parameter. |
ERR_CNC_NO_DATA | -28 | The requested data is not available. There is no available NC program specific data relating to an CNC error. |