03-21-2018 02:21 PM
I have a question about how the compiled object cache works. I am transitioning from projects that do not have compiled code separated and new ones that do have the separated compiled object cache option enabled. Can I have some projects with VIs whose compiled code is separate on the same PC as projects with VIs that have compiled code combined? What if there are two projects that happen to have a VI with the same name but different physical disk locations? Will the compiled object cache keep them straight?
Solved! Go to Solution.
03-21-2018 05:33 PM - edited 03-21-2018 05:35 PM
New projects inherit the setting in the options menu. New controls and VIs inherit the setting of the project. Make sure early on that the setting is the one you want because it becomes exponentially more tedious to convert the further on down the road you get.
I know this doesn't actually answer your question, but I think you can extrapolate the answer from the info I've given you.
03-21-2018 07:07 PM
The setting is "per vi" and only updates if the VI gets recompiled (edit, version upgrade, etc.) and resaved. In the project, you can mark/unmark this setting for all vis, but nothing happens to a vi that you don't touch. In summary, it should not matter much.
03-21-2018 08:01 PM - edited 03-21-2018 08:01 PM
@billko wrote:
Make sure early on that the setting is the one you want because it becomes exponentially more tedious to convert the further on down the road you get.
No it doesn't. In the project window, right-click on the project and select properties. Then you can set the Separate From Compiled with a check box as well as hit a button that lists all of the VIs and their setting. You can simply select all items and choose the state you want.
03-22-2018 12:41 AM
@crossrulz wrote:
@billko wrote:
Make sure early on that the setting is the one you want because it becomes exponentially more tedious to convert the further on down the road you get.
No it doesn't. In the project window, right-click on the project and select properties. Then you can set the Separate From Compiled with a check box as well as hit a button that lists all of the VIs and their setting. You can simply select all items and choose the state you want.
Yes you mark them, but they don't update until you save them. If you never touch a VI, it doesn't get updated. In order to make sure you get them all, you have to save them all. Tedious.
03-22-2018 08:54 AM
Thanks for all the great replies.
To be more specific, is there one compiled object cache for all LV VIs? If so, does it matter (with respect to the separate compiled code setting) that you have two VIs on the same PC with the same name?
BTW, regarding @Bilko's comment
@billkoYes you mark them, but they don't update until you save them. If you never touch a VI, it doesn't get updated. In order to make sure you get them all, you have to save them all. Tedious.
Here's a great tool called Mark VIs I found while doing my search:
"Mark VIs and other files to Separate Compiled Code tool can be used to mark/unmark a directory hierarchy of VIs and project libraries to separate compiled code from source file. It provides a way to batch convert Files outside the project interface."
Mark VIs toolkit - Separate Compiled Code for VIs and other files
03-22-2018 09:20 AM
@TeraTech wrote:
Thanks for all the great replies.
To be more specific, is there one compiled object cache for all LV VIs? If so, does it matter (with respect to the separate compiled code setting) that you have two VIs on the same PC with the same name?
@BTW, regarding @Bilko's comment
@billkoYes you mark them, but they don't update until you save them. If you never touch a VI, it doesn't get updated. In order to make sure you get them all, you have to save them all. Tedious.
Here's a great tool called Mark VIs I found while doing my search:
"Mark VIs and other files to Separate Compiled Code tool can be used to mark/unmark a directory hierarchy of VIs and project libraries to separate compiled code from source file. It provides a way to batch convert Files outside the project interface."
Mark VIs toolkit - Separate Compiled Code for VIs and other files
I don't know the specifics, but I would imagine LabVIEW is smart enough to differentiate. That would be a very common scenario.
03-22-2018 10:05 AM
The VI Object cache stores the full path to a file, so as long as the full paths are different, it will use a different entry in the cache.
If you copy a project over to a new directory, it will take much longer to open a VI hierarchy as due to the new path, it will have to re-compile all the VIs and generate the VI Object cache for them. The files in the old directory will open just as before.