Mihai PALADE Posted February 3, 2006 Report Share Posted February 3, 2006 Hi, Are somewhere listed the .Net equivalents for the LabView data types. Personally I am facing one problem with a cluster (LabView) which exported by ApplicationBuilder as a struct typedef struct { LStrHandle aaa; LStrHandle bbb; LStrHandle ccc; LStrHandle ddd; LStrHandle eee; } TD2; I am not sure how to define the TD2 struct into .Net. Thank you, Mihai PALADE Quote Link to comment
Rolf Kalbermatter Posted February 8, 2006 Report Share Posted February 8, 2006 Hi,Are somewhere listed the .Net equivalents for the LabView data types. Personally I am facing one problem with a cluster (LabView) which exported by ApplicationBuilder as a struct typedef struct { LStrHandle aaa; LStrHandle bbb; LStrHandle ccc; LStrHandle ddd; LStrHandle eee; } TD2; I am not sure how to define the TD2 struct into .Net. Thank you, Mihai PALADE I'm afraid you can't. An LStrHandle is a special LabVIEW datatype and there exists no direct .Net equivalent for it. As you can see in extcode.h, it is a pointer to a pointer to an int32 followed by the actual (non-unicode) character string. As such it is not even directly a long Pascal string (although with a pointer to such a beast you could simulate it) but I doubt that .Net even would support that one. Rolf Kalbermatter Quote Link to comment
BryCoBat Posted April 20, 2006 Report Share Posted April 20, 2006 It depends on how you're doing calls between LV and .Net. Check out Brian Tyler's blog (http://detritus.blogs.com/lycangeek/) for info on working with .Net and LabVIEW. Basically, .Net and LabVIEW can communicate via the ActiveX server, or via .Net calls in the block diagram. Clusters in LabVIEW get converted to Object[] in .Net. You have to know what the cluster looks like in order to get the data out, but it can be done. (In your case you have 5 strings, so that's not too bad, and it might be easier to drop a convert cluster to array down and just pass the String[] to .Net...) Also check out the vi.lib/dotnet.llb's To Object and To Variant vi's for passing complicated things like clusters into .Net. Hope this helps! bryancbates@gmail.com Edit: forgot about dotnet.llb in vi.lib Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.