Filter use in cmd lines?
I am using Altair Monarch 20 and i have a model that has three separate filters for data within it. I have a .bat script for export is below:
set "$date=%date:~4%" set "$date=%$date:/=%" echo %$date% "C:\Program Files\Altair Monarch 2020\Monarch.exe" /rpt:"C:\Scripts\Resource\*.FILETYPE*" /mod:"C:\Scripts\Models\TEXTMODEL.dmod" /exp:"C:\Scripts\Exports\EXPORT %$date%.xlsx" /T
Is there a way to add in the bat files to export with a specific filter used?
Answers
-
Hi Brad,
I’m not sure exporting by filter is possible with command line, but I can double check with our product team. As an alternative I recommend building a separate model with each of the three filters then exporting each one, so that would be 3 command Line scripts for the three filters.
Here’s a link to our command line guide if you need it as a reference.
https://docs.datawatch.com/monarch/commandline_guide/Altair_Monarch_Command_Line_User_Guide.pdf
0 -
Hi Bradley,
Although Baba's suggestion would work, but it requires maintaining three models.
Instead you can create three exports in Monarch classic and save both model and project files.Then use the following command line parameter to export all three filters:
"C:\Program Files\Altair Monarch 2020\Monarch.exe" /prj:"C:\mo\test.dprj" /rpt:"C:\mo\report.txt" /pxall
The /pxall parameter exports all filters defined in the project file.
If the /rpt: parameter is not specified in the command line, then the report indicated in the project file will be used.
If the /rpt: parameter is specified in the command line, then it overwrites any report indicated in the project file.
Regards
Mo
0