LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Programatically Replace with Item Found by Project

Hi,

 

I have a Support folder that is Auto-Populating. I need to rename this for example to SupportFiles. This folder contains 1000+ VIs and ctls.

 

As expected, when I do the rename of the folder in Windows it causes conflict in my project.

 

Ideally, I can use the Replace with Item Found by Project to resolve this. But, I don't want to do this manually for all the 1000+ VIs.

Resolving Project Conflicts - NI

I am looking for a scripting VI that implements this Replace with Item Found by Project. Something similar to the one below:

Programmatically replace a project item? - NI Community

 

Thanks

0 Kudos
Message 1 of 4
(158 Views)

Hi Jamison,

 

Do not move the VIs externally, go instead to the Files view (accessible from your project window), then select the VIs you want to move, right-click > "Move on Disk..." > select the new folder (existing or create a new one), "Save All" when prompted. Then go back to your Items view, do a "Stop auto-populating" on your Support Folder, then again "Convert to Auto-populating Folder..." again and select the new folder.

 

Regards,

Raphaël.

 

0 Kudos
Message 2 of 4
(102 Views)

Hi Raphaël, 

 

I have already tried that method, as mentioned from these two KBs:

Moving VIs in a LabVIEW Project to a Different Folder - NI

Renaming Auto-Populating Folders - NI

 

The problem with this approach is, as soon as you Move Files on Disk and selecting the folder. It adds the files again which results to having conflicts.

Conflict.png
I am not sure if there is some steps that I am missing. But this method does not work for me.

Therefore, I was trying if there is a way to this scripting from the project level.

 

0 Kudos
Message 3 of 4
(92 Views)

@jamison.suade wrote:

[...]

The problem with this approach is, as soon as you Move Files on Disk and selecting the folder. It adds the files again which results to having conflicts.


I am not sure if there is some steps that I am missing. But this method does not work for me.

Therefore, I was trying if there is a way to this scripting from the project level.

 


What if you first make the auto-populating folder a normal virtual folder (Right-Click -> Stop auto-populating)?

0 Kudos
Message 4 of 4
(88 Views)