View Single Post
Old 02-01-2011, 05:57 AM
vlad2135 vlad2135 is online now
Registered User
Join Date: 02-01-2011
Posts: 6
Can not make to work!

AddSetMacroStep objApp.Project, macro.Name, macro.Value
does not work for me
I'm doing everyting like in the sample and later in the build trying to output macros value from the cmd file:
echo %MY_TEST%

I got nothing.

What am I trying to achieve - I'm trying to separate my global macros into two files - one is global global , and another is specific for each vendor (it will contain stuff like COMPANY_NAME etc...).

So far I was not able to achieve this because Visual Build do not export macros loaded during build to environment.

I load macros like this:
Application.Macros(vbldMacroGlobal).Load "c:\FULLPATH\vendor.macros"

And then iterate all macros:
For Each macro in vbld_AllMacros()
AddSetMacroStep .......

And then run test.cmd:
echo %MY_TEST%

I got ECHO is on.

On the second run everything is OK because new global macros are exported to environment.

So I've tried to restart build from itself, but failed too:
Builder.Stop or Builder.ResetBuildStatus did not help me.

Any advice for my problem?
Reply With Quote