NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

Removing whitespace in $(FileTime) Macro (Report File Path)

I want to remove the whitespace for the macro $(FileTime) in ReportFilePath.

 

I want this to be applicable to SequentialModel. I have searched both SequentialModel.seq and the applicable sequences for the report path, but I don't see where I can get rid of whitespace or modify the output of these macros.

 

Is there any way to modify these macros? 

0 Kudos
Message 1 of 5
(983 Views)

Maybe an expression like this:

"$(ClientFileDir)\\$(ClientFileName)_Report[" + SearchAndReplace("$(FileTime)", " ", "") + "][$(FileDate)]$(Unique).$(FileExtension)"

Message 2 of 5
(959 Views)

Hi,

 

I have to retract my statement. "+SearchAndReplace("$(FileTime)"," ","")+".$(FileExtension)" does not seem to do anything to eliminate the whitespace in $(FileTime).

 

Is there a location where I would have the opportunity to modify the macro itself?

0 Kudos
Message 3 of 5
(948 Views)

Apparently that did not work because the expression is evaluated before the macros are replaced.

 

The only way to modify the macro is to rebuild C:\Program Files\National Instruments\TestStand 2022\Components\Models\TestStandModels\modelsupport2\modelsupport2.dllmodelsupport2.dll after making whatever changes you need in TestStand\Components\Models\TestStandModels\ModelSupport2\report.c.

 

 

0 Kudos
Message 4 of 5
(942 Views)

It appears you want this in the process model.  open the process model and find GetReportFilePath callback.  Use Parameters.ReportFilePath and make the needed changes against that variable. 

 

You can also easily do this in your sequence using GetReportFilePath callback and then operating against Parameters.ReportFilePath.

0 Kudos
Message 5 of 5
(903 Views)