[Python.NET] Structure as argument
alex omoto
lance23runner at yahoo.com
Sat Dec 8 22:40:19 CET 2007
Hi again,
I am basically trying to integrate some python code with already built VB code. I'd prefer not to have to change VB code, but here are the things i noticed...
(1) All VB optional arguments must be defined when calling them in Python.Net.
(2) I have created a function with a structure as the argument.
Public Structure SomeStruct
Public dVal As Double
End Structure
Public Class Class1
...
Public Function test(ByRef arg As SomeStruct) As Boolean
return True
End Function
End Class
Using Python.Net, I can create the class, then the struct and call the function with the struct as the argument. I get the following error:
System.ArgumentException: Object of type 'System.RuntimeType' cannot be converted to type 'SomeStruct&'
Thanks,
Alex
---------------------------------
Be a better friend, newshound, and know-it-all with Yahoo! Mobile. Try it now.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.python.org/pipermail/pythondotnet/attachments/20071208/f661c4b1/attachment.htm
More information about the PythonDotNet
mailing list