PDA

View Full Version : Master/child project file logging


kinook
04-08-2003, 08:54 AM
I have a master project and child projects which all use the same XML log file. I want to delete the log file each time the master project is built, but if I check the application option to delete the log file at the start of the build, it also gets deleted when each child project builds. How can I achieve this capability?

The application option (http://www.kinook.com/VisBuildPro/Manual/loggingmoreopt.htm) to delete the log file at the start of the build is a global option that affects all builds, so that option should be unchecked in this situation. To delete the log file only at the start of the master project, open the Script Editor (http://www.kinook.com/VisBuildPro/Manual/scripteditor.htm) and add a script function for the vbld_BuildStarting script event (http://www.kinook.com/VisBuildPro/Manual/scriptevents.htm) (by clicking the Events button), and add the following code to it:

vbld_FSO.DeleteFile(vbld_AllMacros().Item("LOGFILE"), True)