04-18-2018 11:21 PM
I'm trying a quick find and replace text within LabVIEW on a few string array constants, attempting to replace a backslash with a forward slash. The search results show a little strikeout icon next to each entry in the array, indicating it can not be replaced.
The Replace help states "A strikeout icon appears next to an entry in the Search Results list if LabVIEW cannot replace that instance. For example, you cannot replace the text in a Property Node or an Invoke Node. You also cannot replace text in running VIs." Fair enough, but I don't see why the string array doesn't qualify for text replacement. Am I missing something?
Solved! Go to Solution.
04-18-2018 11:54 PM
Hello,
It can only replace a string constant,the "\" you want replace is inside array that's why its showing like that for other 2 elements.
04-20-2018 03:22 AM
Is there a reason why string array constants should be excluded from a text replace though? If I can edit the text by hand surely LabVIEW can do it too.
04-20-2018 04:03 AM
Hello,
According to me this is to search text(In find window either you can select Objects OR Text) so that's why it is not allowing to relapse element of a array.
04-25-2018 02:53 AM
So apparently, it's a known bug:
Kudo-ing the idea might still help a little bit to give it priority.
04-26-2018 03:23 AM - edited 04-26-2018 03:23 AM
wiebe@CARYA wrote:
Kudo-ing the idea might still help a little bit to give it priority.
Kudo-ing is probably not possible, since it's state is set to "declined".
04-26-2018 03:43 AM
You might be aware of this option, but I just suggest a workaround, that you can easily create a VI which can do this search and replace via scripting.
You could even make a quick drop plugin for this as i imagine.
04-26-2018 03:51 AM
@Blokk wrote:
You might be aware of this option, but I just suggest a workaround, that you can easily create a VI which can do this search and replace via scripting.
You could even make a quick drop plugin for this as i imagine.
In the idea OP mentions "no scripting please!", so he's aware. In this thread it's a very valid remark. Others might read it that are not aware.
Scripting this is usually not worth the effort for me. I usually copy the control\constant in a new VI, program the modifications, then paste it back. But for 50 constants that would get annoying fast... Doesn't happen to me that often, guess I usually read those kinds of arrays from file.
04-26-2018 04:04 AM
I figured such an oversight was probably a long-standing bug. I ended up writing a script to do this just to check it could be done, though ultimately hand editing the constants was probably quicker. At least NXG has the problem fixed...
... or not. *sigh* It can't even find text in string arrays.