Kinook Software Forum

Go Back   Kinook Software Forum > Visual Build Professional > [VBP] General Discussion
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Rate Thread Display Modes
  #1  
Old 02-28-2006, 09:23 AM
jdavidi jdavidi is online now
Registered User
 
Join Date: 10-27-2003
Posts: 38
Question Unable to set macros in vbld_BuildStarting Project script?

Good morning!

I have add plenty of macros with VBScript throughout my project steps, but I can't seem to get this to happen in the main Project script (vbld_BuildStarting event). When trying to use either of the add methods described here:

http://www.kinook.com/Forum/showthre...light=vbscript

I get:

Error firing vbld_BuildStarting event: Error in System (VBScript) script code at Line 497, Column 1 (Name redefined: 'vbldTemporary') for the Application.Macros(vbldMacroTemporary).Add "MacroName", "MacroValue" attempt

and

Error firing vbld_BuildStarting event: Error in Project (VBScript) script code at Line 1, Column 1 (Type mismatch: 'vbld_TempMacros') for the vbld_TempMacros().Add "MacroName", "MacroValue" method.

Here's my syntax (which works from a Run Script step):
Application.Macros(vbldTemporary).Add "CMD_SUBBUILDNUMBER", "00"
Am I missing something silly or are macros not meant to be added/set in the vbld_BuildStarting event?

Thanks!

-jdavidi
Reply With Quote
  #2  
Old 03-01-2006, 08:16 AM
kinook kinook is online now
Administrator
 
Join Date: 03-06-2001
Location: Colorado
Posts: 6,034
That is supported and works here. Please ZIP and send or post:
1) The info from Help | About | Install Info
2) The .bld file used to build
3) The file listed at Tools | Application Options | File Locations | Global Macros

Thanks.
Reply With Quote
  #3  
Old 03-01-2006, 08:29 AM
jdavidi jdavidi is online now
Registered User
 
Join Date: 10-27-2003
Posts: 38
Thanks for the reply; I noticed when I went to check my Help About screen that I'm on 6.0, and that 6.0a is available for download. I will get that version before sending anything.
Reply With Quote
  #4  
Old 03-01-2006, 03:04 PM
jdavidi jdavidi is online now
Registered User
 
Join Date: 10-27-2003
Posts: 38
Hello again,

I still get the problem with 6.0a, although with the newer version it appears to be adding the temporary macro before stopping the build with the 'Error firing vbld_BuildStarting event' error. Here is my Install Info:

Visual Build Professional 6.0a
Registered to: Info Directions, Inc. (1-computer license)
Windows Version: 5.0.2195.4.0
Install path: C:\Program Files\VisBuildPro6
SftTree_IX86_U_50.dll version 5.02
unins000.exe version 51.42.0.0
VisBuildCmd.exe version 6.0.1.3
VisBuildPro.exe version 6.0.1.5
VisBuildBld.dll version 6.0.1.4
VisBuildCore.dll version 6.0.1.4
VisBuildDotNET.dll version 6.0.1.2
VisBuildExt.dll version 6.0.1.3
VisBuildLog.dll version 6.0.1.3
VisBuildMisc.dll version 6.0.1.3
VisBuildMS.dll version 6.0.1.3
VisBuildMS2.dll version 6.0.1.0
VisBuildNet.dll version 6.0.1.3
VisBuildSvr.dll version 6.0.1.4
VisBuildSvr.Interop.dll version 1.0.0.0

Attached please find a simple build script with which I can reproduce the problem. I'll attach the global macros file you requested with my next posting.

Thanks very much! --jdavidi
Attached Files
File Type: bld for_kinook.bld (270 Bytes, 1626 views)
Reply With Quote
  #5  
Old 03-01-2006, 03:06 PM
jdavidi jdavidi is online now
Registered User
 
Join Date: 10-27-2003
Posts: 38
Here's the global macros file (renamed as a txt file so I could attach it)
Attached Files
File Type: txt visbuildpro.macros.txt (7.8 KB, 1902 views)
Reply With Quote
  #6  
Old 03-01-2006, 03:29 PM
kinook kinook is online now
Administrator
 
Join Date: 03-06-2001
Location: Colorado
Posts: 6,034
Your project script code needs to be inside the vbld_BuildStarting event. Create the event by choosing Edit | Insert Event | vbld_BuildStarting on the menu, then move your code into that method.
Reply With Quote
  #7  
Old 03-01-2006, 03:33 PM
jdavidi jdavidi is online now
Registered User
 
Join Date: 10-27-2003
Posts: 38
Talking

Ahhhh...that did the trick! Never noticed those menu items before. Thank you VERY much!

--jdavidi
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



All times are GMT -5. The time now is 02:24 PM.


Copyright © 1999-2023 Kinook Software, Inc.