Kinook Software Forum

Go Back   Kinook Software Forum > Visual Build Professional > [VBP] General Discussion

Reply
 
Thread Tools Rate Thread Display Modes
  #1  
Old 05-21-2014, 09:00 AM
CodeScrubber CodeScrubber is online now
Registered User
 
Join Date: 04-18-2014
Posts: 5
Get Value of a Macro referenced by the value of another Macro

I have a macro, MACRO_NAME, that has the name of another macro as its value. I need to construct a build rule based on the value of the of macro whose name is stored in MACRO_NAME. Both are temporary macros

%MACRO_NAME% is "ARCHIVE_DIRECTORY"

The value of the ARCHIVE_DIRECTORY macro is "". I need to perform a step if this is the case.

I have tries variations of:
condition:
[vbld_TempMacroObj("%MACRO_NAME%")]

I get:
Error expanding macros or script in property condexpr: <Error in System (VBScript) script code at Line 21, Column 2 (Object required: '[string: ""]')>

What am I missing?

Last edited by CodeScrubber; 05-21-2014 at 09:26 AM. Reason: Title sucks
Reply With Quote
  #2  
Old 05-21-2014, 09:34 AM
kinook kinook is online now
Administrator
 
Join Date: 03-06-2001
Location: Colorado
Posts: 6,003
Apparently the macro value is not an object but a string, so use

[vbld_TempMacro("%MACRO_NAME%").Value]
Reply With Quote
  #3  
Old 05-21-2014, 09:56 AM
CodeScrubber CodeScrubber is online now
Registered User
 
Join Date: 04-18-2014
Posts: 5
Thank you!!!!!!

Wow, that is subtle. Thanks again!

Hopefully, My forehead will heal where I have been bashing it against the wall for the last few hours...
Reply With Quote
Reply

Tags
expression , macro

Thread Tools
Display Modes Rate This Thread
Rate This Thread:

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:32 AM.


Copyright © 1999-2023 Kinook Software, Inc.