LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Don't search for subvi's

I'm writing a simple vi archiving tool.  The intent is to automatically create an archive copy of a vi whenever it is changed.  It is basically working but there is one annoyance.  After I save the file in the archive, I want to lock it.  The probelm is that to lock the file programmatically, you have to open a reference to it.  If the vi in question has subvis, it will try to search for them (after copying, all the subvi links will be broken).  Eventually it will get through the search, but for a vi with many subvis, this can take a while and you have to sit there and stare at the Loading VI box.  I don't want any of the links to update, so that I can restore the vi if need be and all the links will be correct
 
What I would like to do is open the ref to the vi without searching for subvis.  If the subvi isnt where its supposed to be - move on.  Is  this possible?
 
Thanks,
Bill F
0 Kudos
Message 1 of 4
(2,326 Views)

"bfarley" <x@no.email> wrote in message news:1153780816163-395532@exchange.ni.com...
I'm writing a simple vi archiving tool.&nbsp; The intent is to automatically create an archive copy of a vi whenever it is changed.&nbsp; It is basically working but there is one annoyance.&nbsp; After I save the file in the archive, I want to lock it.&nbsp; The probelm is that to lock the file programmatically, you have to open a reference to it.&nbsp; If the vi in question has subvis, it will try to search for them (after copying, all the subvi links will be broken).&nbsp; Eventually it will get through the search, but for a vi with many subvis, this can take a while and you have to sit there and stare at the Loading VI box.&nbsp; I don't want any of the links to update, so that I can restore the vi if need be and all the links will be correct
&nbsp;
What I would like to do is open the ref to the vi without searching for subvis.&nbsp; If&nbsp;the subvi&nbsp;isnt where its supposed to be - move on.&nbsp; Is&nbsp; this possible?
&nbsp;
Thanks,
Bill F



Perhaps there is an alternative. If you set LabVIEW to treat read only vi's as locked, you can set the read only property in the file system. This way, you can skip loading the vi in LabVIEW completelly.


Hope it helps,


Wiebe.
0 Kudos
Message 2 of 4
(2,307 Views)

Hi Bill,

      In LV7.1, I broke a working VI (by renaming a sub VI) then used Open Reference.  Open reference didn't complain, and there was no wait.  However, when I opened the FP, the searching-dialog appeared.  Regardless, are you on a machine where you can use "System Exec.vi" to run the "ATTRIB" command?  If memory serves, "attrib filename +R" makes a file read-only.

Cheers.

"Inside every large program is a small program struggling to get out." (attributed to Tony Hoare)
0 Kudos
Message 3 of 4
(2,301 Views)

tbd, I'm definitely not opening the front panel (I'm using LV8 though).  Below is a screenshot of the code to lock the file.

I'll try the read-only route.

Thanks for the help,

Bill F

0 Kudos
Message 4 of 4
(2,290 Views)