def GetLastError(self, InstanceObject):
InstanceHandle = None
if InstanceObject:
InstanceHandle = InstanceObject._handle
else:
raise ENastranIOException(ErrorCodes.INVALIDPARAM, 'Invalid return/output value')
nErrorMessageBufferSize = ctypes.c_uint64(0)
nErrorMessageNeededChars = ctypes.c_uint64(0)
pErrorMessageBuffer = ctypes.c_char_p(None)
pHasError = ctypes.c_bool()
self.checkError(None, self.lib.nastranio_getlasterror(InstanceInstanceHandle, nErrorMessageBufferSize, nErrorMessageNeededChars, pErrorMessageBuffer, pHasError))
nErrorMessageBufferSize = ctypes.c_uint64(nErrorMessageNeededChars.value)
pErrorMessageBuffer = (ctypes.c_char * (nErrorMessageNeededChars.value))()
self.checkError(None, self.lib.nastranio_getlasterror(InstanceHandle, nErrorMessageBufferSize, nErrorMessageNeededChars, pErrorMessageBuffer, pHasError))
Python Binding has an issue with handle/class-in-parameter
Result looks like following, note the is an undefined "InstanceInstanceHandle":