How to get value from Log.ExpandMacros

User: "Altair Forum User"
Altair Employee
Updated by Altair Forum User

I'm trying to use Log.ExpandMacros method to get some values, assign them to a String, then output those values to a text file.  What is happening is that the value returned from Log.ExpandMacros is the same value I pass as the parameter.

 

Dim test as String

test = Log.ExpandMacros("&[source.name]")

 

At this point, test is "&[source.name]", not the expansion of the macro I expected.  I get the same for other macros as well.  Is this expected?  Is there a way to get the actual value?

Find more posts tagged with

Sort by:
1 - 2 of 21
    User: "Altair Forum User"
    Altair Employee
    OP
    Updated by Altair Forum User

    Update...

     

    I am getting the correct values for some macros ("input", "process") but not "source.name".

    User: "Altair Forum User"
    Altair Employee
    OP
    Updated by Altair Forum User

    Update...

     

    I am getting the correct values for some macros ("input", "process") but not "source.name".

    In my experience also the macros are not always available.

     

    I think you may need to try using Log.GetInputItems (assuming you are working on an input file).

     

    There is an example in the Datawatch User Scripting API help