Michael Aivaliotis Posted September 30, 2005 Report Share Posted September 30, 2005 Trying to find someone that has the following already: Take an array of strings and generate a "string type" case structure that has a case for every element in the array. Quote Link to comment
lavezza Posted October 1, 2005 Report Share Posted October 1, 2005 I'm sure there is a nifty way to do this with scripting, but I haven't learned any of that yet. Below are two VIs that work together to do what you want. I'm sure much more functionality can be added. Follow the instructions on the front panel of Read_String_Array.vi. You will need both VIs. Pat Download File:post-192-1128133374.vi Download File:post-192-1128133381.vi Quote Link to comment
Michael Aivaliotis Posted October 1, 2005 Author Report Share Posted October 1, 2005 I'm sure there is a nifty way to do this with scripting, but I haven't learned any of that yet. Below are two VIs that work together to do what you want. I'm sure much more functionality can be added. Follow the instructions on the front panel of Read_String_Array.vi. You will need both VIs.Pat Nice little trick. Doesn't use scripting but is still a big time saver. Thanks :thumbup: Quote Link to comment
smenjoulet Posted October 6, 2005 Report Share Posted October 6, 2005 Well, I thought I'd take a few minutes and see what I could find. It doesn't appear to be doable via scripting in the way you would think, i.e. the "SelStrings" property of the Case Selector. The "SelStrings" property is read-only as I'm sure you're aware, and there doesn't seem to be any other proprty or method that allows setting of the strings. So I don't think it's directly possible in 7.1 (at least not without additional unknown "superSecret" help). Having said that I coded up this little beast just for fun that will accomplish the task. Certainly nothing revolutionary, it just just a scripting version of Pat's 2 VI method. Download File:post-415-1128637686.vi BTW, it will be possible in LabVIEW8. We just need to figure out how to get scriptig exposed again. Regards, Scott Menjoulet Quote Link to comment
Mike Ashe Posted October 11, 2005 Report Share Posted October 11, 2005 Nifty little scripting tool. Now if you also create a string constant or control and wire it to the new CASE selector node, it will convert the CASE from ENUM to string mode, save a voila!Download File:post-45-1129054241.vi Quote Link to comment
Michael Aivaliotis Posted October 12, 2005 Author Report Share Posted October 12, 2005 BTW, it will be possible in LabVIEW8. We just need to figure out how to get scriptig exposed again. Regards, Scott Menjoulet uhum... you tried to hide it in the image, but I can still tell what version of LV you're running... :ninja: 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.