10-27-2015 05:44 AM
Right so I am having this issue when using the pre/post action. It basically wont let me edit the Vi or put a new one in there. When I select a new file to be executed it gives me connector pane issue warnings. This is because the original VI in there had a few connector panes and the latest one dosn't. It basically wont let me select the new VI and somehow defaults back to the original one even though I have deleted it and renamed it. It will only work with this "old" VI in there but I cant get rid of it. Its somehow stuck in there. Is it possible to flush it out and add a new one??
10-27-2015 07:20 AM
Cheers
--------, Unofficial Forum Rules and Guidelines ,--------
'--- >The shortest distance between two nodes is a straight wire> ---'
10-27-2015 07:28 AM
Yes, the "form" of the Pre-Build and Post-Built VIs, including their Connector Panes, Inputs, and Outputs, are "fixed" by the Build "machinery". You can "import" things into a Pre-Build Action by using VIGs or Constant VIs (like my "Version" VI) or by adding a sub-VI whose inputs come from the Pre-Build's inputs (like my SVN Build).
What is it you are trying to do? Maybe we can suggest a work-around ...
Bob Schor
10-27-2015 08:15 AM
I have used the generate VI button and used the default name of "Post-Build Action" and just left it empty( to test). It still loads the old VI into it. When I go back and hit the generate VI button the icon of the VI is like below.
Is SVN putting it in there somehow. How is a VI with different name keep getting put in here.
10-27-2015 09:48 AM
All I want to do is run a VI at build to write the SVN number to a config file. This I can do seperately but cannot implement it in the pre/post build actions. It should be very straight forward but this old code always end up in it even if its deleted. Its driving me mad.
10-27-2015 09:57 AM - edited 10-27-2015 10:00 AM
Right click the VI and go to the SVN option "Unversion and add to ignore list".
You could also try the SVN Delete function rather than trying to delete through Windows. This is usually the safer way to delete anyways because someimes SVN can get confused.
If it's still including the Pre-Build action when you build, are you sure you're unchecking the box to "Execute VI before build"?
Make sure you're saving your project as well...
Cheers
--------, Unofficial Forum Rules and Guidelines ,--------
'--- >The shortest distance between two nodes is a straight wire> ---'
10-27-2015 02:50 PM
Am I correct that you want a Pre-Build Action that gets the Version Number from SVN and writes that to a file in .INI format (using the LabVIEW Config functions)? I'd think that would be (as my Canadian friends would say) un morceau de gateau. I just banged this out, and absolutely haven't tested it, but it seems to me this should work (Famous Last Words) ...
Bob Schor
10-27-2015 02:55 PM
@Bob_Schor wrote:
Am I correct that you want a Pre-Build Action that gets the Version Number from SVN and writes that to a file in .INI format (using the LabVIEW Config functions)? I'd think that would be (as my Canadian friends would say) un morceau de gateau. I just banged this out, and absolutely haven't tested it, but it seems to me this should work (Famous Last Words) ...
Bob Schor
This is what I was referring to above, but as a Post-Build Action. It would be super easy to edit the config file that is built with the executable it include a Version tag (or Build or whatever) and just pull the executable's INI file. This would eliminate any need to include another file with the build.
Cheers
--------, Unofficial Forum Rules and Guidelines ,--------
'--- >The shortest distance between two nodes is a straight wire> ---'
10-28-2015 09:20 AM
James,
I'm not sure I understand, if building a Config.ini file, why (or if) it matters if it is done pre-Build or post-Build.
Using a Config file certainly "decouples" the precise timing of getting the SVN Revision Number from saving it. However, if it is saved "external" to the Build (as in a Config file), that's another file to track, unless one uses the .ini file created by the Build (which lives in the same folder as the .exe).
Ohhh, now I get it -- you do this post-build because you want to use the Build-created .ini file. Very clever, I didn't think of/realize that. My only worry would be how to identify the .ini by name. If the Main Destination Path points to the .exe (instead of just to the folder), then it's easy -- just replace .exe with .ini.
Bob Schor
10-28-2015 09:35 AM
I enjoyed reading your thought process.
The Post-Build Action VI also gives an array of files created by the build. You could pull the INI file path from this, or by pulling exe filename like you said.
Cheers
--------, Unofficial Forum Rules and Guidelines ,--------
'--- >The shortest distance between two nodes is a straight wire> ---'