Gribo 13 Report post Posted March 22, 2017 Hello, I am trying to automate some code generation using a project template. The template also has build specification. I want to add an auto-populating folder to the build specification, but I can't get it to work. I am using the AB_API_SDIST class. If the folder exists in the template, I get an error 'Can't add the container to build specification'. If the folder does not exist in the template, I get a 1055 error code. How can I make it work? Share this post Link to post Share on other sites
jacobson 23 Report post Posted March 22, 2017 So are you trying to add a virtual folder under the Build Specifications section of a project? I've never seen a virtual folder there and I can't seem to add one manually in a LabVIEW project or even drag an existing, empty, virtual folder into build specifications. If LabVIEW is throwing an error that you 'Can't add the container to build specification' I'm guessing it's just not something you can do. I'm also not sure why there would be an auto-populating folder under the build specifications because the build specifications don't have files associated with them. Share this post Link to post Share on other sites
Gribo 13 Report post Posted March 22, 2017 No, I am trying to add a standard folder to the 'Always included files' list. It is possible to add a folder to the 'Always included' list manually, so I should be able to do it via the API. Share this post Link to post Share on other sites
jacobson 23 Report post Posted March 22, 2017 Ohh, that makes much more sense. Share this post Link to post Share on other sites
Gribo 13 Report post Posted May 26, 2017 Below are screen shots of the operation I am trying to automate. I am using LV2014 Share this post Link to post Share on other sites
BramJ 2 Report post Posted January 7 @Gribo Did you ever figure this out? I am trying to do the same thing Share this post Link to post Share on other sites
Gribo 13 Report post Posted January 8 (edited) No, I have manually created a template build specification which includes the folders that I want, then I copy it. Edited January 8 by Gribo Share this post Link to post Share on other sites
BramJ 2 Report post Posted January 9 (edited) Ok, thank you Virtual folders are proving to quite a bit of trouble, simply deleting one from the project can result in labview 2017 crashing (only on Windows 10 it seems) Edit: and in Windows 7 as well, just seems less likely to happen Edited January 9 by BramJ Share this post Link to post Share on other sites
flarn2006 78 Report post Posted February 4 I was trying to script something involving a build specification just yesterday. I'm pretty sure "Targets" refers to things like "My Computer", not build specifications. You can get a reference to the Build Specifications folder through the "My Computer" property of the project, IIRC. And from there you can get the Owned Items[] property, find the one you need, and use "To More Specific Class" to make it a Build Specification refnum. However, strangely, I haven't found any methods/properties that do anything specific to build specifications. Maybe I'm looking in the wrong place though. Share this post Link to post Share on other sites
Darren 175 Report post Posted February 4 2 hours ago, flarn2006 said: However, strangely, I haven't found any methods/properties that do anything specific to build specifications. Maybe I'm looking in the wrong place though. Yeah, I'm not aware of any. The App Builder API (vi.lib\AppBuilder\AB_API) provides most of the functionality you would need to programmatically modify build specs. I talk about it briefly in my Hidden Gems presentation: http://www.ni.com/hiddengems Share this post Link to post Share on other sites
flarn2006 78 Report post Posted February 4 (edited) 42 minutes ago, Darren said: Yeah, I'm not aware of any. The App Builder API (vi.lib\AppBuilder\AB_API) provides most of the functionality you would need to programmatically modify build specs. I talk about it briefly in my Hidden Gems presentation: http://www.ni.com/hiddengems Taco deli? 😉 Edited February 4 by flarn2006 1 Share this post Link to post Share on other sites
Darren 175 Report post Posted February 4 24 minutes ago, flarn2006 said: Taco deli? 😉 I prefer Torchy's. 1 Share this post Link to post Share on other sites
flarn2006 78 Report post Posted February 4 23 minutes ago, Darren said: I prefer Torchy's. So would that be T0rchy$, or...? 😁 Share this post Link to post Share on other sites