An exclusive raffle opportunity for active members like you! Complete your profile, answer questions and get your first accepted badge to enter the raffle.
Hi Al,Good to hear from you again. Are you aware that Command Line automation via batch of com (vba, vb .net etc) requires an additional license?As long as your client has that, then it all works great. If vba is in use, I would tend to use the com automation rather than Monarch Command Line as you will get more flexibility. For example, you can dynamically set the input report, active filter and many other aspects of the Monarch session.If you don't need any dynamic interaction, then command batch line will also work well. Please note that Version 15 requires the switches that were optional in some previous versions. I'm not sure when they became mandatory.A typical command line might be . . . "C:\Program Files\Datawatch Monarch 15\Monarch.exe" /rpt:"E:\Temp\MyReport.prn" /mod:"E:\Models\MyModel.dmod" /exp:"E:\Exports\MyExport.xlsx" /TProjects can also be automated. I think the format is . . . "C:\Program Files\Datawatch Monarch 15\Monarch.exe" /prj:"E:\Temp\MyProject.dprj" /PXAllA simple vba script might be . . . Set MonarchObj = CreateObject("Monarch32")MonarchObj.SetProjectFile("C:\Betty Test\Betty Test.xprj")t = MonarchObj.RunAllExports()MonarchObj.ExitUsing vba, t can be inspected to see if the export has been successful. For example, If T = False Then Result = WSHShell.Popup("Export Failed!",, "Export Results", 16)Else Result = WSHShell.Popup("Export Passed", 3, "Export Results", 64)End IfThe programmers reference guide can be downloaded from docs.datawatch.com in the "Other Monarch Documentation" section.Regards,Steve.------------------------------Steve CaielsProfessional ServicesAltair-------------------------------------------------------------------------Original Message:Sent: 09-07-2019 12:06 PMFrom: Al RiceSubject: Automating Monarch v15.x using Command Line in .bat FilesHello AllI am a long time Monarch user and have done some amazing work using the tool. I have a Monarch v15.x client wanting to automate Monarch sessions using the Command Line automation with .bat files, which will be called from Excel VBA scripts. Does anyone have any experience with this configuration and can share your experience and "dos and don'ts". Any good documentation for reference?There are other ways to approach this, but I want to check in with my Monarch friends as this has always been a rich source of support for me.Thanks,Al------------------------------Al RiceOwner - President- CEOTrends In Data, LLCWest Bloomfield MI(248) 761-5238------------------------------"