Traceback (most recent call last):
File
C:\Python22\Lib\site-packages\pythonwin\pywin\framework\scriptutils.py,
line 310, in RunScript
exec codeObject in __main__.__dict__
File
C:\Deneb\BHSS\Projects\AKL_0502\VC\PythonApplications\OPCWriteTestor.py,
line 103, in ?
Sensor(1)
By using pythoncom.Missing, which I read about in another thread, I got a
LabVIEW error message instead:
return self._get_good_object_(
pywintypes.com_error: (-2147352567, 'Exception occurred.', (5002, 'LabVIEW',
'LabVIEW : paramVals type mismatch. Expected 1D array of variants.', None,
0, 0),
--- Graham Bloice [EMAIL PROTECTED] wrote:
Traceback (most recent call last):
File
C:\Python22\Lib\site-packages\pythonwin\pywin\framework\scriptutils.py,
line 310, in RunScript
exec codeObject in __main__.__dict__
File
So the new question is: how do you create a 1D array of variants
in python?
From what I've read this is normally handled behind the scenes by
PythonCom...?
That's correct - just pass a list or tuple. However, that is rarely the
complete answer - what *type* of variant should be in the array?
--- Mark Hammond [EMAIL PROTECTED] wrote:
C:\Python22\Lib\site-packages\win32com\client\__init__.py,
line 446, in _ApplyTypes_
return self._get_good_object_(
com_error: (-2147352567, 'Exception occurred.',
(0,
None, None, None, 0, -2147024809), None)
The second value in that
Hi Mark
Not sure if I got what you suggested correct. The
method I am trying to use is defined as:
def SyncWrite(self, NumItems=defaultNamedNotOptArg,
ServerHandles=defaultNamedNotOptArg,
Values=defaultNamedNotOptArg),
Errors=pythoncom.Missing):
There appears to be an extra close paren