Tim_S Posted June 15, 2012 Report Share Posted June 15, 2012 I'm using scripting to update a time/date constant with the current time when the build occurs. This is done in the Pre-Build Action. I have verified the scripting works (the VI is saved as part of the script). The build, however, has the time in the constant before the build occurred. The VI that is modified is not loaded in memory before the build (as far as I can tell). This leads me to two questions: One, why does the changes the scripting makes not get into the built code? Two, how do I get this as part of the build? I have an idea forming that should let me do what I want (create a VI that updates the constant, then runs the build script), but I really need to understand what isn't happening the way I think it should be first. Tim Quote Link to comment
Aristos Queue Posted June 15, 2012 Report Share Posted June 15, 2012 I am NOT particularly knowledgeable about AppBuilder. For the purposes of this post, treat me as a user, not as part of R&D. :-) After you make the scripting changes, do you call the Save Instrument method on the VI? If you do, then I've got no idea. If you don't, then I believe I know the answer: LabVIEW loads a fresh copy of your VIs into a new application instance to do the build. I do not know if this happens before or after the PreBuild VI runs. If it happens after, then I would expect your in memory changes to be loaded into the new app instance, but it could be that we load from disk... I'm honestly not sure. If it happens before, I do know that we will not update from your developer app instance after that copy is made unless the changes are saved to disk (actually, the saving-to-disk rule is the usual rule for forcing an update of the other app instances, but the AppBuilder app instance is special and it might not update even on save, but I *think* that it does). Quote Link to comment
Jon Kokott Posted June 15, 2012 Report Share Posted June 15, 2012 I did this exact thing in Labview 2010. It was super annoying because then a popup would occur during the build saying that the vi had been modified (obviously) which occurred like a half hour into the build. I cant upload files right now, but all I did was modify a string constant with a new date and save it (using Save.Instrument invoke node.) I was pretty careful about closing all the references, but I doubt that is what your problem is. Quote Link to comment
Tim_S Posted June 15, 2012 Author Report Share Posted June 15, 2012 After you make the scripting changes, do you call the Save Instrument method on the VI? Yes, I've got the Save Instrument method in there. I did this exact thing in Labview 2010. It was super annoying because then a popup would occur during the build saying that the vi had been modified (obviously) which occurred like a half hour into the build. I cant upload files right now, but all I did was modify a string constant with a new date and save it (using Save.Instrument invoke node.) I was pretty careful about closing all the references, but I doubt that is what your problem is. References are all closed, so, yes, that's not a problem. I started thinking about a VI that modifies the constant then starts the build. I'm not getting a modified message, but it may resolve the issue I'm having. Tim Quote Link to comment
jkittle Posted March 6, 2014 Report Share Posted March 6, 2014 I am running into the same issue. I created a pre-build script that updates items in the build spec. However these updated get applied to the build spec on the harddisk and not into the current build spec loaded into memory. I spent hours figuring this out. It looks like the best solution is to create a script that runs my pre-build tasks and then calls the build script. 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.