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

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.