LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

why is Get File Type.vi password protected

Solved!
Go to solution

Hi...  We have a code that was developed in LabVIEW 8.6...  We have a need to attempt to save this code all the way back to version 7.1...  I saved it back from 8.6 --> 8.5 --> 8.2.1 --> 8.0 with no issues...  But when I then try to save it back from 8.0 to 7.1 I encounter one LabVIEW 8 vi that has no equivalent functionality in 7.1...  And that one vi is

 

C:\Program Files\National Instruments\LabVIEW 8.x\vi.lib\Utility\lvfile.llb\Get File Type.vi

 

When I look at that vi in 8.x, to endeavor to see if I can replace its functionality by writing some code in 7.1, I find that the Get File Type.vi is password protected...  More out of curiousity than anything, why is that code password protected???  I wasn't aware that any of the standard purchased LabVIEW code came password protected...  Can anyone tell me why that is???  thanks...  bob..

0 Kudos
Message 1 of 6
(2,896 Views)
Solution
Accepted by paris1_

Hi paris1,

 

NI is hiding some functionality from the user. Especially features, which aren't allowed for general use like Scripting, are password protected...

 

You will find a lot more VIs that are protected by NI...

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 2 of 6
(2,888 Views)

got it...  much appreciated...  But a big bummer for trying to figure out the functionality if you can't see it...  Oh well..  thanks for the answer...

0 Kudos
Message 3 of 6
(2,880 Views)

That VI is using an internal callback into LabVIEW (i.e. non G-based code) to determine the type of the file.  I'm guessing the callback doesn't exist in 7.1, so you would need to write your own G-based implementation for getting the type of a file  in the 7.1 case.  The simplest solution would be to work with the extensions of the files...not perfect, but probably close enough assuming your files are well-named.  Also, the following VI can give you a bit more information about LabVIEW-specific files (independent of extension):

 

LabVIEW 7.1\vi.lib\Utility\libraryn.llb\Librarian Get Info.vi

0 Kudos
Message 4 of 6
(2,863 Views)

Out of interest, I used this function recently to test the type of a bunch of files to find PPLs and it failed to recognise them when the file suffix was not exactly lvlibp. So the routine inside isn't actually checking the file content, it's possibly just checking the file suffix? If so, it's not particularly clever.

Thoric (CLA, CLED, CTD and LabVIEW Champion)


0 Kudos
Message 5 of 6
(145 Views)

Hi Thoric,

 

in LV2019 this function still uses the LabVIEW-internal "LVGetFileType" call, so nothing changed in all the time since LV8.6…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 6 of 6
(137 Views)