Jump to content

Find and Replace Text on VI


Recommended Posts

I'm working on a plug-in architecture that starts from a template.

But across all the VI's in said template is the word template. labels, descriptions and so on.

As part of my plug-in springboard application (which takes the template and starts you up on a mostly created plugin) I would like to find and replace all instances of the word template w/ the word of their choosing.

And as a new way of operating, I'm trying to avoid going straight to the LV devleopers downstairs to ask questions and start here, (and if they chime in, I'll impart their knowledge here)

So it feels that someone must have done this by now, I know that I could code it up manually, but if it's done, why should I?

Link to comment

I would like to find and replace all instances of the word template w/ the word of their choosing.

Darren Nattinger wrote about "TRef Traverse for References.vi" here. I used it to write a simple requirements coverage tool that looks for and highlights free labels. I believe I could use it to find/replace any text if I knew what class names to traverse for.

post-7534-125685694199_thumb.jpg

Link to comment

Its not too hard to find and replace text. Passa Mak does it for controls, indicators and tip strips. It also has a diagram scanner to extract string constants. It wouldn't take much of an imagination to modify the the relevent bits for descriptions, revision history, decoration text etc. Although its not designed for regex replacements, it covers a lot of the bases you'd need or, at the very least, show you how to go about it.

Edited by ShaunR
  • Like 1
Link to comment

Could you post a snippet from Passa Mak (or, a few) to show how you're finding all of the

label (tags), captions, tip strips and any ancillary text (such as graph axis, plot names etc) of all controls and indicators on the front panels and any string diagram constants that have their captions (or labels for digrams) visible to a number of language files

I don't have LabVIEW 2009.

Link to comment

Could you post a snippet from Passa Mak (or, a few) to show how you're finding all of the

I don't have LabVIEW 2009.

It grabs all controls from a FP. Then extracts the labels and text dependent on the control type. PM Get Control Text.vi uses recursion so it will drill down into nested clusters.

Passa Mak creates a list to save to a file since the save and load are separate, but for a regex replacement you could put a write node immediately after the read node in the PM Get Control Text.vi and modify the string in between.

Edited by ShaunR
  • Like 1
Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
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.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.