John Lokanis Posted October 25, 2013 Report Share Posted October 25, 2013 Has anyone come up with a way to auto-update the accessors for a control in the class private data when you change it's type or rename it? I find myself doing this a lot as I re-factor code. It means removing VIs from the project and then deleting them on disk, then building new accessors. Or, I could manually edit the accessors but that is even slower. I am just curious if anyone has created a scripting VI to automate this. thanks for any tips. -John Quote Link to comment
todd Posted October 28, 2013 Report Share Posted October 28, 2013 Have you tried the LVOOP assistant? http://lavag.org/files/file/132-lvoop-assistant/ Quote Link to comment
John Lokanis Posted October 28, 2013 Author Report Share Posted October 28, 2013 I have looked at that but don't see a function that does what I am trying to do. Maybe I am missing something? Quote Link to comment
todd Posted October 28, 2013 Report Share Posted October 28, 2013 Sorry, crossed my wires. Check out "Rename LVOOP Labels" in the NI LabVIEW Tools Network. I think it shows up in default VIPM repos. http://lavag.org/topic/15258-team-lava-rename-lvoop-labels-now-cwlv-silver/?hl=%2Brename+%2Blvoop+%2Blabels Quote Link to comment
John Lokanis Posted October 28, 2013 Author Report Share Posted October 28, 2013 I have that but it does not work for some reason. Still does not address my issue. (even if it did work). Quote Link to comment
todd Posted October 28, 2013 Report Share Posted October 28, 2013 Arg. Sorry, I mis-read the requirement. I haven't seen anyone post a tool for that. Quote Link to comment
John Lokanis Posted July 2, 2014 Author Report Share Posted July 2, 2014 Ok, resurrecting this one because I am in the middle of an massive bug fix re-architecture that requires me to change the name of a class data element in many classes. After doing a few, I am back to wishing there was a tool to do this for me. So, does anyone know if it exists? If not, is it even possible via scripting? Here are the steps: Select the class private data element to change. Rename it to the new name (I'm not even trying to change its type). Save Find any accessors for the element. Rename their VIs to match the new name. If said accessors are in a property folder, rename the folder to match the new name. Rename the inputs and output on the accessors to match then new name. Save everything. I can handle the VI FP edits and the file name changes. Not sure how to edit the class control or how to update the property folder name. I also don't want to end up doing this: http://xkcd.com/1319/ -John Quote Link to comment
LogMAN Posted July 3, 2014 Report Share Posted July 3, 2014 I cannot give you a final solution, however here is a snipped to access the items in a class private data control as well as the property definition folder (I can't change the name to write, but maybe a newer version of LabVIEW can do that?). This snipped does nothing useful, but you should be able to edit the class control and property folders with that. Quote Link to comment
John Lokanis Posted July 3, 2014 Author Report Share Posted July 3, 2014 Yes, you are correct. The folder name cannot be changed. So I guess I am stuck. Maybe I can buy some of the NI guys a few beers at NI Week and try to persuade them to open this up. Quote Link to comment
LogMAN Posted July 3, 2014 Report Share Posted July 3, 2014 Yes, you are correct. The folder name cannot be changed. So I guess I am stuck. Maybe I can buy some of the NI guys a few beers at NI Week and try to persuade them to open this up. You could still delete the existing one and create a new one, however it might be difficult to handle all the relinking... I remember something about an INI key to activate "hidden" functions for VI scripting (or rather node options which are considered unstable as they are still in development and thus haven't been released for public access)... Maybe someone knows what I'm talking about and could share their thoughts? ... or maybe I'm insane? 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.