キャンセル
次の結果を表示 
次の代わりに検索 
もしかして: 

Find and replace

Hi guys

Once more I have an question and maybe the answer can satisfy a lazy guy ;).

Is there a way to easily find and replace vis? I know the find-function (which is quite good) but if I want to replace one vi which is used several places, I have to right-click and replace them manually. Is there a function where I can also find them and click a replace button if I want to replace the vi or not (just like it is possible in MS Notepad or any other texteditor)?

Thomas
Using LV8.0
--------------------------------------------------------------------
Don't be afraid to rate a good answer... 😉
--------------------------------------------------------------------
0 件の賞賛
メッセージ1/10
4,679件の閲覧回数
I don't think there's something like that, I think the fastest way will be to save the old VI in the same name as the new VI (in a temp location), and then replace one of its instances with the new VI. Since the name will be identical, it will ask you if you want to replace. Then you can delete the temp.
I'm not sure whether saving one of the instances under a different name will affect all of them (I think it will), so you may have to close the app to force the change to take place. It's up to you to decide whether it's worth it or not.

___________________
Try to take over the world!
0 件の賞賛
メッセージ2/10
4,661件の閲覧回数
Hi tst

This may work if both vis are selfmade. But if I have one of the yellow ones, I can't replace it as you described.
There it may be helpful to have such a mechanism.

Anyway - thanks your answer.

Thomas
Using LV8.0
--------------------------------------------------------------------
Don't be afraid to rate a good answer... 😉
--------------------------------------------------------------------
0 件の賞賛
メッセージ3/10
4,656件の閲覧回数
No, not function but there is a way.

Take advantage of the fact that LV will only allow you to have one VI of a particular name in memory at one time (like tst was suggesting).

1) Close all of your VI's (and LV just to be sure).

2) Open the VI that you want to include in your application and make sure it is the same name as the VI you want to replace.

3) OPen your top level VI. All of your VI will now point at the VI you pre-opened.

4) Do a "save as" on the pre-opened VI. NOw all of the calls to the VI in your app will be pointing a the new named VI.

5) Save all of your VI's and close everything.

Once you do this you will have achieved the same results as having done a "find and replace".

Ben
Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
0 件の賞賛
メッセージ4/10
4,644件の閲覧回数
Hi Ben

Does this also work if I want to replace functions like queue-operations (enqueue, dequeue, ...)?

Thomas
Using LV8.0
--------------------------------------------------------------------
Don't be afraid to rate a good answer... 😉
--------------------------------------------------------------------
メッセージ5/10
4,638件の閲覧回数
Ben, I don't think your suggestion will work, because he wants to replace the yellow ones (the function VIs) and they don't seem to have names in the traditional sense. You can have a VI called "add.vi" and the add VI open at the same time.

___________________
Try to take over the world!
メッセージ6/10
4,633件の閲覧回数
Correct tst!

and NO Bechtho.

This procedure will only work if the object in questions shows up when you do a

Application Open >>> All VI's in memory


Sorry I was not able to help! (But that will not stop me from trying.)

Ben
Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
0 件の賞賛
メッセージ7/10
4,623件の閲覧回数
Yes tst, you're right.

And I maybe don't want to replace all vis in one turn which means that I wanna have the possibility to control if a vi (or function) shall be replaced or not.
Using LV8.0
--------------------------------------------------------------------
Don't be afraid to rate a good answer... 😉
--------------------------------------------------------------------
0 件の賞賛
メッセージ8/10
4,623件の閲覧回数

Well I am finally getting around to finsishing reading the upgrade notes for LV 8 and I found this on page 91of 108.

"

In LabVIEW 7.

x and earlier, you can replace an object on the block

diagram by right-clicking the object and selecting

Replace from the

shortcut menu. In LabVIEW 8.0, you can replace multiple objects or pieces

of text at once. Use the

Find dialog box to search VIs for VIs, objects, and

text. Then use the

Search Results window to replace all or only selected

items with other objects or text.

"

 

I should stasrt reading these relase notes sooner. スマイリー ウインク

Ben

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
メッセージ9/10
4,495件の閲覧回数
Boy!   That's something I sure could have used a time or two!  I don't think there's an  existing, clever way of doing this.  However, in the future, if you build all your applications with generous use of subvi's it's a real easy matter to reload the thing with the modified subvi's, should the need arise.   I haven't run into any real performance issues with multiply nesting subvi's, but there may be some.  I think Dennis might be able to answer this better than I can.
 
Eric
Eric P. Nichols
P.O. Box 56235
North Pole, AK 99705
0 件の賞賛
メッセージ10/10
4,465件の閲覧回数