Gribo Posted March 22, 2017 Report Share 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? Quote Link to comment
jacobson Posted March 22, 2017 Report Share 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. Quote Link to comment
Gribo Posted March 22, 2017 Author Report Share 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. Quote Link to comment
jacobson Posted March 22, 2017 Report Share Posted March 22, 2017 Ohh, that makes much more sense. Quote Link to comment
Gribo Posted May 26, 2017 Author Report Share Posted May 26, 2017 Below are screen shots of the operation I am trying to automate. I am using LV2014 Quote Link to comment
BramJ Posted January 7, 2019 Report Share Posted January 7, 2019 @Gribo Did you ever figure this out? I am trying to do the same thing Quote Link to comment
Gribo Posted January 8, 2019 Author Report Share Posted January 8, 2019 (edited) No, I have manually created a template build specification which includes the folders that I want, then I copy it. Edited January 8, 2019 by Gribo Quote Link to comment
BramJ Posted January 9, 2019 Report Share Posted January 9, 2019 (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, 2019 by BramJ Quote Link to comment
Sparkette Posted February 4, 2019 Report Share Posted February 4, 2019 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. Quote Link to comment
Darren Posted February 4, 2019 Report Share Posted February 4, 2019 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 Quote Link to comment
Sparkette Posted February 4, 2019 Report Share Posted February 4, 2019 (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, 2019 by flarn2006 1 Quote Link to comment
Darren Posted February 4, 2019 Report Share Posted February 4, 2019 24 minutes ago, flarn2006 said: Taco deli? 😉 I prefer Torchy's. 1 Quote Link to comment
Sparkette Posted February 4, 2019 Report Share Posted February 4, 2019 23 minutes ago, Darren said: I prefer Torchy's. So would that be T0rchy$, or...? 😁 Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.