Tryng to use Powershell to get Compiler Action info

Hi,

Using FB 6.2, I am trying to use Powershell in a BeforeAction event for a Delphi Compiler Action and I want to retrieve the OutputDir option from the Action.  I am able to get the value ok by doing this:

$theDir = $Action.OutputDir

echo $theDir

The result is %BUILD_TYPE% which is what I had entered into that option.  However, I want this to be expanded.  I do have IsMacro checked for that variable so I thought I would get the actual value for that variable but apparently not.

So I thought maybe this would do it:

$theDir = $FBVariables.GetVariable($Action.BPLOutputDir)

but this returns nothing.

Can someone tell me how to get what I have in the OutputDir option for the Delphi Compiler Action into a PowerShell variable?

Thanks!

Kevin

 

Hi Kevin

You should be able to do this :

$theDir = $Action.ExpandExpression($Action.OutputDir)

however when I just tested this I got an error. I’ll look into this first thing monday morning.

Thanks Vincent.