How to Set the Export Directory for COM Automation

Monique_21913
Monique_21913 Altair Community Member
edited August 2022 in Community Q&A

I'm running version 15.3 and use VB to run a little automation program that opens a report, applies a model, runs an export.   I've been doing it for decades and it works like a champ.  Yay.

So now I have a new user request to create a summary report.  I do the magic and have a project with an export in it.   Everyone is super happy.  I go to run it in my staging environment and it can't find the output directory.  

Neither oMonarch.RunAllExports() and oMonarch.RunExport(exportDefinition) appear to allow me to set the export directory. 

Any idea about how to set the output folder for exports using COM automation?   Basically I want to find a property that would look something like this oMonarch.Export[0].Destination ="C:\myexportpath\"   or oMonarch.Export[0].DestinationTable =  "C:\myexportpath\output.xlsx" 

Thanks in advance for any help.  I love this product.  It's saved my work literally thousands of dollars in programming time!!
                     

Tagged:

Answers

  • Monique_21913
    Monique_21913 Altair Community Member
    edited August 2022

    Just posting this in case someone else comes across this issue.   Basically I wasn't able to find a way to set this up but I was able to figure out the default file output destination and, within my program, move it to the desired output folder.

     

     

     

  • Al_22614
    Al_22614 Altair Community Member
    edited August 2022

    Just posting this in case someone else comes across this issue.   Basically I wasn't able to find a way to set this up but I was able to figure out the default file output destination and, within my program, move it to the desired output folder.

     

     

     

    Hi Monique:

    Thanks for sharing this post, and congratulations for finding as solution!  Since you have a Monarch COM automation license, I would strongly suggest downloading the Altair Monarch Programmer's Guide which will open many effective functions for automation beyond the "C:\" prompt approach you seem to be using now.  Additionally, you can leverage the powerful VBA scripting within Microsoft products (Excel, Access, etc.)

  • Monique_21913
    Monique_21913 Altair Community Member
    edited August 2022
    Al_22614 said:

    Hi Monique:

    Thanks for sharing this post, and congratulations for finding as solution!  Since you have a Monarch COM automation license, I would strongly suggest downloading the Altair Monarch Programmer's Guide which will open many effective functions for automation beyond the "C:\" prompt approach you seem to be using now.  Additionally, you can leverage the powerful VBA scripting within Microsoft products (Excel, Access, etc.)

    Thanks for posting back!   It actually is very disappointing to me that the Programmer’s Guide doesn’t seem to have changed since I started using it decades ago.   I’ve never tried to use the command prompt as I’m a software developer and not an Excel jockey but I would sure love it if you would flesh out the documentation a bit.   Thanks ever so much and I hope someone is able to answer the other perhaps simpler question I posted.