Daniel_Chile Posted July 29, 2014 Report Posted July 29, 2014 Hello. I need to get all the string constants in the block diagram of a bunch of VIs, programmatically, and save them to a CSV file. What would be the most effective method? Regards, Daniel Quote
GregSands Posted July 29, 2014 Report Posted July 29, 2014 (edited) Something simple like this should work: Just pass a reference to the VI you want to use. Edited July 29, 2014 by GregSands 1 Quote
Daniel_Chile Posted July 30, 2014 Author Report Posted July 30, 2014 Thanks, Greg. However, one thing I did not mention is that the code I want to inspect is in LabVIEW 8.5.1. I can inspect my LV851 code from LV 2013 using VI Scripting, but now I wonder if there is one method I can use from within LV851. Kind regards. Quote
hooovahh Posted July 30, 2014 Report Posted July 30, 2014 Versions 8.6 to 2009 scripting can be accessed using these instructions. https://decibel.ni.com/content/docs/DOC-4973 I can't remember but I think 7.x era you used the SuperSecret INI key, and I can't remember the steps for 8.0-8.5. In any case scripting existed in some form back that far. Try this VI that I saved back to 8.5. I don't have 8.5 to test it on so no idea if it works. Get String Const.vi 1 Quote
Daniel_Chile Posted July 30, 2014 Author Report Posted July 30, 2014 Thanks, Hooovahh. Your VI didn't work because the "traverse" subVI was missing. However, I've put together a working VI in LV2013, without subVIs, and saved it to LV851 as you suggest. I opened in LV851, one last minor change and voilá! It worked. Thank you all. LAVA is a great support resource. Kind regards, Daniel Quote
Darren Posted July 30, 2014 Report Posted July 30, 2014 That approach won't work for constants inside structures...the AllObjs[] property of the TopLevelDiagram class does not recurse into structures. The Traverse VI is present in LabVIEW 8.5., just with a different name/location: [LabVIEW 8.5]\vi.lib\Utility\traverseref.llb\TRef Traverse for References.vi. 1 Quote
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.