LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

build path from string control

Solved!
Go to solution

"List Folder" return the same path of the input "path".

it does so in both cases ( building path or with controll path ).

0 Kudos
Message 21 of 29
(1,763 Views)

In that case, I don't see why the path value would not be passed through the tunnel.

 

I see that you are using 'auto-indexing' for the filenames AND you wired a value to the 'N' terminal of the for loop. This is to be avoided!

If you enable auto-indexing for more than one tunnel or if you wire the count terminal, the actual number of iterations becomes the smaller of the choices.

 

I suspect that is causing your problems.Try hooking an indicator up to the 'i' terminal of the for loop to see how many iterations it does.

0 Kudos
Message 22 of 29
(1,744 Views)

Kk I'll try.

However I don't understand why, using the "path controll", works. And instead constructing the path does not work.

Mystery

0 Kudos
Message 23 of 29
(1,741 Views)

I have tried. The problem is not that

0 Kudos
Message 24 of 29
(1,739 Views)

Have you checked how many iterations the for loop does?

 

Does the List folder function return an error?

 

How many items does the filenames array contain?

0 Kudos
Message 25 of 29
(1,724 Views)

For Loop makes an iteration number less than N.
No, it does not return any error.
With regard to the last question:
when I use "build path" there are no items in the array filenames (as if the folder was empty). If I use a "path controll" the filenames array is filled with the files in the folder ( correctly ).

0 Kudos
Message 26 of 29
(1,720 Views)

Ok, that narrows it down a bit.

 

Because the filenames array is empty, the for loop does not execute at all.

 

The problem seems to be the path from 'build path' which does not exist.

 

This will cause 'List folder' to return an error (but you will not see it as it is wired to the for loop). Try disconnecting the error line from 'list folder', you should get error -7 <file not found>.

 

Please attach an indicator to the output of 'build path' and check the generated path, you should be able to copy/paste that into windows explorer.

You get the selected value from ring2, how are you sure that this is the correct value, maybe this piece of code executes before the user has made his selection. Please check by placing a probe or indicator.

0 Kudos
Message 27 of 29
(1,708 Views)

Mhmm....

the indicator in the output of "build path" gives me back an existing path ( it's sure ).

Sorry... I did not understand what you mean in the last two lines

0 Kudos
Message 28 of 29
(1,702 Views)

I see you started a new thread, I'll post my reply in the new thread.

0 Kudos
Message 29 of 29
(1,685 Views)