LabVIEW Idea Exchange

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

Path Type Function needs another return for an empty path

Status: Completed

Implemented in LabVIEW 2014

Path Type Function returns 0 Absolute Path if the path is empty.

 

It should return 2 <Not A Path> or better yet a 3 <Empty Path> when path is empty.

 

Sure I could check to see if the control = not a path or = empty path, but it would be nce to have one function to check.

========================
=== Engineer Ambiguously ===
========================
13 Comments
AristosQueue (NI)
NI Employee (retired)

RTSLVU: This is a very old API that predates my time on LabVIEW. My guess is that there was a desire to strictly segregate "type" from "value" in the language primitives. That seems like a good division to have in the language primitives, but I can see the use for a higher-level function also in the palettes that aggregates the functionality.

 

As a workaround today, you can, of course, write such a VI yourself and add it to your user.lib.

 

Out of curiosity... what would you name such a VI, assuming we kept the existing primitives in the palettes?

crossrulz
Knight of NI

It is called the OpenG Valid Path.vi.  It is in the OpenG file library.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
RTSLVU
Trusted Enthusiast

I would not change the name at all, just add the new fuctionality

 

========================
=== Engineer Ambiguously ===
========================
AristosQueue (NI)
NI Employee (retired)

RTSLVU: My point was that the existing primitives need to stay exactly as they are, untouched, but that a new combo functionality could be introduced as a new VI in the palettes.

 

An empty path as an absolute path is a valid path on UNIX-based systems.

RTSLVU
Trusted Enthusiast
I see, couldn't he functionality be different depending on the operating system?
========================
=== Engineer Ambiguously ===
========================
AristosQueue (NI)
NI Employee (retired)

> I see, couldn't he functionality be different depending on the operating system?

 

Not really... what about a windows machine that is processing information from a remote client? The path might not be interpreted on the local system. As a primitive of the language, we need a node that can handle even the bleeding edge use cases.

 

A new higher level node might be given more specialized functionality (even if it is the 80% use case, it's still a specialization).

Darren
Proven Zealot

RTSLVU: I'm planning on adding a VI to the Comparison palette in LabVIEW 2014 called "Is Path and Not Empty?". It will return a TRUE if the input path is anything other than <Not a Path> or empty path. Is this a sufficient solution for your use case? If so, I'll move this idea to "In Development".

RTSLVU
Trusted Enthusiast
Yes that would work for me.
========================
=== Engineer Ambiguously ===
========================
Darren
Proven Zealot
Status changed to: In Development
 
Darren
Proven Zealot
Status changed to: In Beta