Quick Drop Enthusiasts

cancel
Showing results for 
Search instead for 
Did you mean: 

Search for Shared Variable

Just before Darren posted I was going to say scripting as well could probably do it.  I've not really tested this, but if I were you I would script these steps. 1. Find the Shared Variable node. 2. Find the terminal of the node, read its coordinates. 3. Find the wire connected to the terminal. 4. Delete the node. 5. Place the new node at the coordinates of the old one. 6. Find the terminal on the new node were the connection goes.  7. Actually make the connection. 

 

All of this via scripting nodes.  Also as a side note, you may want to consider what you are replacing this with.  Are you planning to replace all SV nodes with locals cause that won't work like this so easy.  Are you replacing them with something like a message enqueuer or tag engine, because you may need to place a string constant to name the message or signal along with the replacement VI as well.

0 Kudos
Message 11 of 17
(1,217 Views)

If you really want to do this, it can probably be done by scripting, though I haven't tested this I've done similar things. I would do the following:

1. Find the node to replace and read it's coordinates. 2. Find the nodes connecting wire. 3. Delete the Shared Variable node. 4. Place the node you want as the replacement at the same coordinates. 5. Connect the wire from the now missing SV node.

 

You may also want to consider that this won't work if you're drop in replacement is a local variable.  I'm guessing you're replacement is a tag or message engine enqueuer in which case you may also be needing to drop string constants to indicate the name of the signal or message your are sending.

0 Kudos
Message 12 of 17
(1,217 Views)

I know Ctrl-F was working for me.  However, it does not anymore.  I believe this is since I updated to LabVIEW 2017SP1.  Can anyone verify that this still works for them or if I need to configure anything?

0 Kudos
Message 13 of 17
(1,194 Views)

What isn't working specifically? I opened a VI in LabVIEW 2017 SP1 and did a text search for a variable name and the variable object was found.

0 Kudos
Message 14 of 17
(1,182 Views)

Without seeing your setup, I'd guess one of the following is wrong, either you've got "Case sensitive" or "Match whole word" checked in your search, or the "Application Instance" for your search is wrong (not set to the project and target it should be).  I have those happen from time to time.

0 Kudos
Message 15 of 17
(1,171 Views)

I does work from typed text.

 

I recall the ability to click on a shared variable and then hit ctrl-f.  The find window would pop up with the actual shared variable selected (without resorting to a text search).  Maybe my memory is failing me.  I don't have 2017 around anymore to just try it.  In that case, is there an easy way to grab the text from the variable to perform the text search?

0 Kudos
Message 16 of 17
(1,170 Views)

That does work for VIs (and has in the past too), not so much for Shared Variables (same in past versions).

0 Kudos
Message 17 of 17
(1,167 Views)