LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Finding and REPLACING hidden text in Labview

Hello,

 

Is there a faster way of finding and (more importantly) replacing hidden text in LabVIEW

 

I have a text that I need to replace in about a 100+ places and the text in question is hidden under an enum constant.

 

I can find the text one by one and edit the name under properties for each enum constant but a replace all or even a replace text does not work for hidden texts.

 

Thank you

K

0 Kudos
Message 1 of 10
(2,068 Views)

What kind of text are you referring to?

  • The strings of an enum constant?  If so, is it typedef'd?
  • Free labels?
  • String constants?
  • Something else?
"If you weren't supposed to push it, it wouldn't be a button."
0 Kudos
Message 2 of 10
(2,031 Views)

@Kaizen14 wrote:

Hello,

 

Is there a faster way of finding and (more importantly) replacing hidden text in LabVIEW

 

I have a text that I need to replace in about a 100+ places and the text in question is hidden under an enum constant.

 

I can find the text one by one and edit the name under properties for each enum constant but a replace all or even a replace text does not work for hidden texts.

 

Thank you

K


I'm guessing you are talking about editing enum items.  This is ugly, and I guess every LabVIEW programmer has to live through this.  Once.  Hopefully this will teach you to typedef at the very least an enum that is going to be used in more than one place.  (I normally just automatically typedef an enum because I've never met one that I used only once.)

Bill
CLD
(Mid-Level minion.)
My support system ensures that I don't look totally incompetent.
Proud to say that I've progressed beyond knowing just enough to be dangerous. I now know enough to know that I have no clue about anything at all.
Humble author of the CLAD Nugget.
0 Kudos
Message 3 of 10
(1,984 Views)

In the Find window, click More options and activate 'Look in hidden text'

G# - Award winning reference based OOP for LV, for free! - Qestit VIPM GitHub

Qestit Systems
Certified-LabVIEW-Developer
0 Kudos
Message 4 of 10
(1,966 Views)

Thank you Yamaeda,

 

I activated the 'Look in hidden text'. Its just that even after doing that, it does not replace with the text I want. I have to go to each instant a select the text from the drop down I want and then I can replace it

0 Kudos
Message 5 of 10
(1,960 Views)

Thank you bilko,

 

Yes I agree with you. This is a legacy program I am in charge of modifying and looks like the original programmer opted against typedef and so I am kind of stuck.

 

I was looking for a faster way of editing the enum keeping this in mind.

 

Looks like I will have to slog through this and in the meanwhile I can make it as typedef to save the future programmer the same issues.

 

I appreciate you suggestion. 

Message 6 of 10
(1,957 Views)

Hi Paul,

 

Yes these are strings of an enum constant and it is not typedef'd unfortunately. 

 

 

0 Kudos
Message 7 of 10
(1,953 Views)

I guess you've already thought about it, but if you create the Type def, you can then do a search for this text and use ctrl+g to step between the instances and easily paste/replace the enum with the type def. Then you can update the typedef with the changed text.

G# - Award winning reference based OOP for LV, for free! - Qestit VIPM GitHub

Qestit Systems
Certified-LabVIEW-Developer
0 Kudos
Message 8 of 10
(1,944 Views)

You could also make a VI using Scripting that'll look for all instances of enums, then check to see if it's the right enum, and replace it with a typedef. That would solve two of your problems.

0 Kudos
Message 9 of 10
(1,925 Views)

@Kaizen14 wrote:

Thank you bilko,

 

Yes I agree with you. This is a legacy program I am in charge of modifying and looks like the original programmer opted against typedef and so I am kind of stuck.

 

I was looking for a faster way of editing the enum keeping this in mind.

 

Looks like I will have to slog through this and in the meanwhile I can make it as typedef to save the future programmer the same issues.

 

I appreciate you suggestion. 


A long time ago I created a VI that automated that process.  I'll rummage around for it.

"If you weren't supposed to push it, it wouldn't be a button."
0 Kudos
Message 10 of 10
(1,910 Views)