LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Strip path multiple times

 



Thanks but it did not work for me. I fed something like C:\a\b\c\file.vi into the stripper function and fed the output into a 2nd  copy of the stripper fn. I put indicators on both outputs and both yielded C:\a\b\c.


When trying to recreate the code shown above, did you remember to change the tunnels to shift registers?

 


 

 

Sorry for the confusion. Since I was doing it only twice I pasted 2 strippers rather than a for loop (w/ shifter registers).

0 Kudos
Message 21 of 25
(1,676 Views)

 


@jvh75021 wrote:

Sorry for the confusion. Since I was doing it only twice I pasted 2 strippers rather than a for loop (w/ shifter registers).


 

As I said, please attach your code if you suspect there is something wrong, so we can try to reproduce the problem.

 

As mentioned, the function works just fine for the rest of us (or at least for me ;))

0 Kudos
Message 22 of 25
(1,667 Views)
The problem was partly poor observation, a too small indicator, and what I consider unusual behavior.
Some of our paths are very deep, this particular one was 7 dirs deep and some of the dir names are similar.
If the output is:
"c:\top_level\level_two\level_three_is_longer"
and your indicator is only big enough for 
"c:\top_level\level_two\level_thre"
what you will see is
"c:\top_level\level_two\                               ".               
              
That is, the displayed value is cut off after the last backslash that will fit.
Sorry for all the uproar but y'all did provide some interesting  & informative discussion.
Thanks to all of you,
jvh
0 Kudos
Message 23 of 25
(1,660 Views)

@jvh75021 wrote:
The problem was partly poor observation, a too small indicator, and what I consider unusual behavior.
Some of our paths are very deep, this particular one was 7 dirs deep and some of the dir names are similar.
If the output is:
"c:\top_level\level_two\level_three_is_longer"
and your indicator is only big enough for 
"c:\top_level\level_two\level_thre"
what you will see is
"c:\top_level\level_two\                               ".               
              
That is, the displayed value is cut off after the last backslash that will fit.
Sorry for all the uproar but y'all did provide some interesting  & informative discussion.
Thanks to all of you,
jvh

Actually it is not cut of but line wrapped. But to see that you would need to extend the path control downwards.

Rolf Kalbermatter  My Blog
DEMO, Electronic and Mechanical Support department, room 36.LB00.390
0 Kudos
Message 24 of 25
(1,523 Views)

@altenbach wrote:

 

Also, Darin's method is windows specific and might not work on e.g. Mac or linux (I have not tried). You really should stick with the native path functions.

 

Actually the first line of Darin's code works fine on all LabVIEW platforms since the constant is a path control too and therefore changes the path seperator automatically. And the double point works on all LabVIEW platforms as "go one up".

Rolf Kalbermatter  My Blog
DEMO, Electronic and Mechanical Support department, room 36.LB00.390
0 Kudos
Message 25 of 25
(1,522 Views)