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 09-26-2005, 05:39 PM
MikePeterson MikePeterson is online now
Registered User
 
Join Date: 09-26-2005
Posts: 10
More nested values

I have several macros containing build numbers with corresponding builds that read which build number they're supposed to use from an ini file.

For example,

Ini:
BuildNum=SP2_BUILDS

Bld:
BUILDNUM macro = %READ_INI(%INIFILE%,Settings,BuildNum,DEFAULT)%

So, at this point, BUILDNUM = SP2_BUILDS. Now SP2_BUILDS is another macro that will get incremented by this script and as an example, has a current value of 25.

How can I use the BUILDNUM macro in other macros (i.e. Version = 1.0.%BUILDNUM%) where ultimately I get the expansion of SP2_BUILDS - 1.0.25 - instead of 1.0.SP2_BUILDS?

Thanks.
Reply With Quote
  #2  
Old 09-26-2005, 05:47 PM
kinook kinook is online now
Administrator
 
Join Date: 03-06-2001
Location: Colorado
Posts: 6,034
http://www.kinook.com/Forum/showthre...?threadid=1249
Reply With Quote
  #3  
Old 09-27-2005, 12:37 PM
MikePeterson MikePeterson is online now
Registered User
 
Join Date: 09-26-2005
Posts: 10
Thanks for the quick response. I'd actually looked at that post as well as one other and implemented it incorrectly. I've tried this again but I must be doing something wrong.

Here's my first Set Macro step:

BUILDNUM macro = %READ_INI(%INIFILE%,Settings,BuildNum,DEFAULT)%

In a second Set Macro step I've tried to set the macro version to:

1.0.[vbld_AllMacros().Item("BUILDNUM").Value]

and

1.0.[Application.ExpandMacros("%%%%BUILDNUM%%%%")]

and both yield 1.0.SP2_BUILDS for the value of version instead of 1.0.25.

Can you tell me what I've done wrong?

Thanks.
Reply With Quote
  #4  
Old 09-27-2005, 01:38 PM
kinook kinook is online now
Administrator
 
Join Date: 03-06-2001
Location: Colorado
Posts: 6,034
If I understand correctly, you could use

1.0.[Application.ExpandMacros("%%%BUILDNUM%%%")]
Reply With Quote
  #5  
Old 09-27-2005, 01:55 PM
MikePeterson MikePeterson is online now
Registered User
 
Join Date: 09-26-2005
Posts: 10
SWEET!!! Thank you.

Would you be so kind as to explain the significance of the number of % signs as I haven't been able to find anything in Help or in the User's Manual.

Thanks again!!!
Reply With Quote
  #6  
Old 09-27-2005, 02:08 PM
kinook kinook is online now
Administrator
 
Join Date: 03-06-2001
Location: Colorado
Posts: 6,034
http://visualbuild.com/Manual/?hints.htm -- see 4th bullet
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 03:44 PM.


Copyright © 1999-2023 Kinook Software, Inc.