Solved

Print message in cmd command-line

  • 9 September 2021
  • 2 replies
  • 26 views

Badge

Hello,

I am trying to print a custom message at the command-line, while running aimms via a batch-file. The goal is to get an information about the status and the progress of the optimization. I have tried the DialogMessage, DialogProgress and the Display function with no success. Can anyone help me with that?

Best regards

Jonathan 

icon

Best answer by mohansx 10 September 2021, 20:19

@JonathanSchade all the functions you tried are AIMMS IDE (or WinUI) specific functions, and their output won’t be passed on to the command line. 

 

You should using the Execute function, with CMD echo. See cmd documentation: cmd | Microsoft Docs

AIMMS reference doc: Run Executable Files — AIMMS How-To

Sample AIMMS code block:

Execute(

    Executable  : "cmd /k" , 

    CommandLine : "echo hello aimms" , 

    WorkDir     :  , 

    Wait        :  0, 

    Minimized   :  0);

View original

2 replies

Userlevel 5
Badge +2

@JonathanSchade all the functions you tried are AIMMS IDE (or WinUI) specific functions, and their output won’t be passed on to the command line. 

 

You should using the Execute function, with CMD echo. See cmd documentation: cmd | Microsoft Docs

AIMMS reference doc: Run Executable Files — AIMMS How-To

Sample AIMMS code block:

Execute(

    Executable  : "cmd /k" , 

    CommandLine : "echo hello aimms" , 

    WorkDir     :  , 

    Wait        :  0, 

    Minimized   :  0);

Badge

That was the right hint! Thank u very much!

Reply


Didn't find what you were looking for? Try searching on our documentation pages:

AIMMS Developer & PRO | AIMMS How-To | AIMMS SC Navigator