Matlab Unit report msgbox window

Moderator: jasper

Matlab Unit report msgbox window

Postby King » 11 May 2017, 08:14

If I want to add a msgbox or dialog, how to put their windows on top of all windows when called?
King
 
Posts: 22
Joined: 17 February 2017, 06:22

Re: Matlab Unit report msgbox window

Postby jasper » 11 May 2017, 08:54

In CAPE-OPEN one should not use message boxes during unit operation calculation.

Having said that (as the same applies for the edit dialog), normally a message box or any modal dialog appears on top naturally. I suppose you are running in AspenPlus? In this case the actual simulator is not the same executable as the front-end application (apmain.exe, apwin.exe). To get a dialog launched from apmain.exe on top of apwin.exe you will have to apply some tricks, which go beyond the scope of the Matlab unit operation.

Can you not use the message logging system instead?

http://amsterchem.com/matlabunitophelp.php?page=logmessage.htm

If you need a response (e.g. yes,no) an option perhaps is to use a boolean input parameter.
User avatar
jasper
 
Posts: 1128
Joined: 24 October 2012, 15:33
Location: Spain

Re: Matlab Unit report msgbox window

Postby King » 12 May 2017, 00:44

jasper wrote:In CAPE-OPEN one should not use message boxes during unit operation calculation.

Having said that (as the same applies for the edit dialog), normally a message box or any modal dialog appears on top naturally. I suppose you are running in AspenPlus? In this case the actual simulator is not the same executable as the front-end application (apmain.exe, apwin.exe). To get a dialog launched from apmain.exe on top of apwin.exe you will have to apply some tricks, which go beyond the scope of the Matlab unit operation.

Can you not use the message logging system instead?

http://amsterchem.com/matlabunitophelp.php?page=logmessage.htm

If you need a response (e.g. yes,no) an option perhaps is to use a boolean input parameter.


Thank you very much Jasper, I know how to deal with it.
King
 
Posts: 22
Joined: 17 February 2017, 06:22


Return to MATLAB Unit Operation (AmsterCHEM)

Who is online

Users browsing this forum: No registered users and 0 guests