From: Rolf K. <rol...@ci...> - 2005-12-21 00:23:40
|
Hi Joakim, > > >Chances are that there is no good solution which works both for pre > 2.3.5 and later. > > Sounds like you are approaching the source already! Hope it > affects only pyimport.c? Nope it is more likely affecting lvpython.c and in there PyCloseHost and there again the use of PyEval_.. functions as well as probably PyThreadState_Swap(). It is definitely in there where LabVIEW hangs indirectly when trying to unload the script DLL. > >No! The variant datatype as used in LabVIEW is not documented, nor are > >any of the LabVIEW manager >functions needed to deal with this datatype. > >It is positively not directly compatible with a Windows OLE variant and > >my drive for reverse engineering such an obscure datatype is close to 0. > > I see. > Would you like to point me to where I can find docs about the LabVIEW > API for script nodes? I would like to have types for waveform plots and > xy plots. I have problems generating those types when calling LabVIEW > VIs from Python through win32com because that module doesn't distinguish > between tuples (clusters) and lists (arrays). I guess that module uses > OLE variants. I'm not aware of official documentation for the script node API. Basically I did start out to reverse engineer that API and then Jim Kring managed to get in touch with a LabVIEW developer who was willing to give us the header file defining that API as used in LabVIEW 6.0. As far as that is concerned it basically just confirmed most of the things I had already found out and it was more or less what is now in lvpython.h except some of the comments in there which I had added myself before, based on my own findings. I'm sure the script node in current LabVIEW version has some more features added but that is of little importance for labpython up to this moment. If you interface LabVIEW through win32com then you interface through COM (which was called OLE and now listens to the name of ActiveX) and as such you will eveidently see OLE variants. Waveforms are basically LabVIEW variants but LabVIEW takes care of converting from its own variants to OLE variants when you interface the ActiveX interface of LabVIEW. Rolf Kalbermatter |