This idea is not to take the awesome OpenG functions and make them native. This idea is to take the native functions that exist today, and extend the functionality to mirror the OpenG equivalents. There are several functions to talk about and I realize this may make this idea fragmented, but they all have to deal with File I/O functions, that are native, but lack the features of the OpenG equivalent.
Generate Temporary File Path
Here we see the OpenG Temporary File Name allows for specifying the file name and extension. So for instance my name can be "My Temp File %d.hoo". I can also specify a subfolder to put things in, which makes cleanup easier because I can just delete the whole subfolder when I'm done. This can make a files in "%temp%\Applicatoin Temp\My Temp File %d.hoo", but the native function can only speicfy a extension for the temporary file.
File Extensions
Here we see the OpenG Strip Path Extension accepts a file and returns the root and extension. Here the function is polymorphic and accepts a string, a path, an array of paths, or an array of strings. This can be helpful if you have a file name and want to get the root and extension. OpenG also has a Convert File Extension which can replace a file extension if one exists. If one doesn't exist it adds one. This also is polymorphic and accepts a string or a path again useful for a file name, or a relative and absolute path.
The native function only works on paths, and there is no convert function.
Build Strip Path
Here the OpenG functions are polymorphic. The Build Path accepts a path as the base, or an array of paths. The name or relative path can be a string, or an array of strings, or a path or an array of paths. And the Strip Path accepts a path, or an array of paths to strip. This is 8 polymorphic types between the two functions, but the native functions combined only have 3. The native Build Path accepts a string or path as the name or relative path, and strip path isn't polymorphic at all.
For existing functions I understand NI hasn't changed much but when NI introduced the Get File Extension, and Generate Temporary Path, I was confused why NI wouldn't try to duplicate the standard OpenG functions. Sorta like how when NI made the Clear Errors accept an error to clear why they didn't implement the function similar to OpenG's filter errors which is polymorphic.
Unofficial Forum Rules and Guidelines
Get going with G! - LabVIEW Wiki.
17 Part Blog on Automotive CAN bus. - Hooovahh - LabVIEW Overlord
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.