LabVIEW Idea Exchange

cancel
Showing results for 
Search instead for 
Did you mean: 
Dragis

update path primitive

Status: Declined

Any idea that has received less than 5 kudos within 5 years after posting will be automatically declined.

labview needs a primitive that makes it easy to modify a path into another slightly different path. my main need is to be able to change the file extension (or append one), but i also find myself moving a file to another relative location nearby (and changing the file extension). this requires many different operations today (even with the new 'get file extension' palette item). let's go all the way and make something truly useful.

 

update-path.png 

8 Comments
RavensFan
Knight of NI
Wouldn't the Move function on the File I/O >> Advance palette do the same thing?
Dragis
Active Participant

Ravens Fan wrote: Wouldn't the Move function on the File I/O >> Advance palette do the same thing?

i guess i wasn't very clear in the post, sorry about that.

 

this primitive would be used to create the path, not actually do the work. it's along the lines of the build path, strip path, get file extension, etc. nodes.

Manzolli
Active Participant

What are the options for the "extension handling (replace)"?

 

I created my VIs to do this kind of job, but I think a VI like that may be handy if came with LabVIEW. Kudos!
André Manzolli

Mechanical Engineer
Certified LabVIEW Developer - CLD
LabVIEW Champion
Curitiba - PR - Brazil
Dragis
Active Participant

Manzolli wrote:

What are the options for the "extension handling (replace)"?


i tend to just use two flavors, replace or append. once in a while i do a prepend (e.g. replace .vi with .foo.vi). i think those three should cover most use cases, but feel free to post others.

Manzolli
Active Participant

"i tend to just use two flavors, replace or append. once in a while i do a prepend (e.g. replace .vi with .foo.vi). i think those three should cover most use cases, but feel free to post others."

 

Two or three? I guess can be at least three: "replace (default)", "add" and "remove". The last one is useful when you need to save many files with the same name but different extensions, like in a project, when you get the "directory" (address) + "file root name" (name - extension) of the file, just adding the appropriate extension.

André Manzolli

Mechanical Engineer
Certified LabVIEW Developer - CLD
LabVIEW Champion
Curitiba - PR - Brazil
silmaril
Member

Why should this be a primitive?

Wouldn't a sub vi in the palette suffice?

 

I don't expect the increased performance that you might get by coding this in C to have a tangible impact on real world applications.

 

It looks as if you already wrote such a VI (or did you only create the icon and description?). 

So you could publish it here today and try to get it into the palette for LV 2011.

 

Dragis
Active Participant

what i mean when i say primitive is that national instruments supplies the node as part of their software packages so we don't have to get it from a third party or create it ourself. i don't really care how ni implements it as long as its useful 🙂

 

actually, in this case i did just throw together the interface to the vi. i found several other subvis that all did slightly different things and this api was the superset of each of those. if i get a chance in the next couple days, i'll implement the vi and post it here.

 

thanks for the comments. 

Darren
Proven Zealot
Status changed to: Declined

Any idea that has received less than 5 kudos within 5 years after posting will be automatically declined.