05-04-2020 01:59 PM
I don't do a huge amount of scripting, so this could be a "user error" or a misunderstanding, but I've been working on some project level scripting and ran into an issue when I went to automate the process of adding a Project Folder to the "always include" section of a Packed Project Library build.
When the reference circled below is a VI "item", everything runs fine w/out error.
When the reference is for a project folder (virtual or auto-populating) we get an error.
The error is a -4500 error, without explanation, however it does seem to have something appended to the end of the message which says
"Container cannot be added to the build"
This functionality can be done easily from the project build UI itself, but this seems to not work as expected.
Since these libraries/VIs are password protected I can't dive in and see what the issue might be.
Attached is a .zip file which includes the VI above as well as the necessary components to mimic this issue.
Running in LV2018 32-bit, on a windows 10 system.
Thanks.
05-05-2020 02:42 AM
My guess would be that the created folder that is converted to auto populating stops existing after the conversion. This would be easy to test with Not A Number\Path\Reference.
My first try would be to get a new reference to the converted folder after the conversion.
05-05-2020 10:07 AM
wiebe@CARYA wrote:
My guess would be that the created folder that is converted to auto populating stops existing after the conversion. This would be easy to test with Not A Number\Path\Reference.
My first try would be to get a new reference to the converted folder after the conversion.
Seems to not be the case. I've run this in a handful of ways... w/autopopulating, w/snapshot folders... I've also done it where I go and pull the references out manually from the project well after creation. Anytime you try to add any kind of folder, this error occurs.
If you take a look at the error source it's coming from a VI. The error itself seems to be suggesting that adding a "container" (which I assume here is a type that includes folders) is forbidden:
05-05-2020 10:57 AM
@jyoung8711 wrote:If you take a look at the error source it's coming from a VI. The error itself seems to be suggesting that adding a "container" (which I assume here is a type that includes folders) is forbidden:
That could be . The UI might allow it by going over the content and adding it one by one.
05-05-2020 04:12 PM
wiebe@CARYA wrote:
That could be . The UI might allow it by going over the content and adding it one by one.
I have tested that as well.
If you do that, it will indeed add all of the items, but it does not add the folder... so if something is added to the folder after the fact, it will not be included in the build when executed, which is not particularly useful 😞
05-06-2020 04:31 AM - edited 05-06-2020 04:32 AM
@jyoung8711 wrote:
wiebe@CARYA wrote:That could be . The UI might allow it by going over the content and adding it one by one.
I have tested that as well.
If you do that, it will indeed add all of the items, but it does not add the folder... so if something is added to the folder after the fact, it will not be included in the build when executed, which is not particularly useful 😞
The UI wouldn't have that problem, as it could simply repeat the adding each time it executes.
So, it might be how the UI is doing it.
I'm not sure why you can't?
05-07-2020 02:38 PM
If you add a folder to the UI, and then close the UI, add something to the virtual folder, and then build, the app builder will include that new thing in the build w/out the UI being opened.
This is the behavior I'm looking for.
I can recursively add everything in the folder via scripting... but I cannot add the folder itself. So if I script the build creation, and then add something in the project, it will NOT show up in the build, which is undesirable behavior.
I'm trying to get things set up for a Plugin SDK for users who may not be familiar with PPL builds, so I'm trying to give them the correct set of tools w/out making them dive into the build.
05-08-2020 03:37 AM
The UI simply stores the folder (and the fact it is a folder) in the project's XML. When building, the VIs are added.
You could do the same, but it might be difficult.