find and replace


Recommended Posts

You mean across all, not just one sequence I'm assuming since that already exists.

BTW: it's generally considered good coding practice to avoid "magic numbers".  These are numbers that you might want to change in many places.  Instead you should use DAQFactory's define to create a name for your constant.  Then you can just change that in one place.  So for example:

define NumberOfTanks = 4
define string AppName = "My App"

You can then use these anywhere you would use a variable, except on the left side of an equal sign, or any other place where it would be changed.  The only way to change a defined variable is to define it again.

 

Link to comment
Share on other sites

  • 2 weeks later...

I can hit ctl+F within a sequence and it opens the  find feature, but I don't see any replace option....

Anyway its not to big of a deal, i realized that you can just paste the script into Microsoft word and use the find and replace features in there...

What brought this up was I had mad an application with 20 temperature channels, and had written some long sequences to do things with them. I then make 20 humidity channels and duplicated  the sequences  to have the same functions for the humidity channels. this resulted in me having to change the word Temp to Humid in about 100 places in the scripts. just using the word processor made it super easy.

I could have made a private string within the sequences for the names perhaps if i was thinking ahead.

thanks for the input....

 

 

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.