09-09-2020 04:20 PM - edited 09-09-2020 04:26 PM
Hey all,
So I've recently started restructuring my projects to be like what the first image shows. It's so succinct and neat looking, and because everything is privately scoped, I can be sure that there are no cross dependencies between projects. Well that's all well and dandy until I realize that my Post-Build Action VI (second image) can't be privately scoped. Which really sucks. Ruins the neatness completely.
I might make a suggestion in IE to allow privately scoping of Pre and Post-Build Action VIs, but I feel like this is something that would be fairly hard to achieve. But in the meantime, what would y'all do to keep things as neat as possible? Here is what came to mind for me:
1. Change SubVIs Virtual Folder's access scope to Not Specified, keep all private except the PBAVI:
2. Make Public and Private Virtual Folders inside the SubVIs folder, with each sub folder scoped appropriately:
3. Change the Documentation Virtual Folder's access scope to Public (because what does privately scoping documentation do anyway, it just looked even neater with literally everything privately scoped) and add the PBAVI to it:
4. Something else that I haven't thought of yet.
I'm probably being excessively picky here, but this is something that will be the same across every project I own. They all have a PBAVI. So I kind of think I need to be a bit picky about it. Anyway, as always, any thoughts/ideas are appreciated. Leaning towards option 2 at the moment. But again, in an ideal world, I'd be able to privately scope the PBAVI to eliminate the possibility of cross dependencies.
Saying "Thanks that fixed it" or "Thanks that answers my question" and not giving a Kudo or Marked Solution, is like telling your waiter they did a great job and not leaving a tip. Please, tip your waiters.
09-09-2020 05:09 PM
So I'd opt for number 2, but I have to ask, how exactly do you plan on using a library in which literally everything is privately scoped? Do you JUST use everything within the library, never intending any VI's at all to be reused as part of something else?
Regarding privately scoping the PBAVI, you can't do that, as that VI isn't called by the library itself- it's called by the App Builder, which is outside the library.
If you really wanted to, I suppose you could write a privately scoped Build VI that calls the App Builder. Doing that would let you use PBAVI's easily enough, but you'd lose the simplicity of doing it from the Project Explorer.
09-10-2020 06:41 AM
@BertMcMahan wrote:
Do you JUST use everything within the library, never intending any VI's at all to be reused as part of something else?
Yep. May seem silly, but putting everything in a library (even though it'll never be shared or used by something else) was the only way to be able to privately scope everything. Again, to ensure no cross dependencies. Soon as I started doing this, I got a few errors saying that I can't access an item in private scope, aka I had brought in something from another project as a dependency instead of creating a new one.
@BertMcMahan wrote:Regarding privately scoping the PBAVI, you can't do that, as that VI isn't called by the library itself- it's called by the App Builder, which is outside the library.
If you really wanted to, I suppose you could write a privately scoped Build VI that calls the App Builder. Doing that would let you use PBAVI's easily enough, but you'd lose the simplicity of doing it from the Project Explorer.
I figured. Still kind of a bummer but oh well. And I might try doing something like that, but more for me to learn how to do it and not to actually implement it in all of my projects. Thanks for the idea though!
Saying "Thanks that fixed it" or "Thanks that answers my question" and not giving a Kudo or Marked Solution, is like telling your waiter they did a great job and not leaving a tip. Please, tip your waiters.