| MATLAB Function Reference | ![]() |
www.kxcad.net Home > CAE Software Index > MATLAB Index >
Enable, disable, or report status of Automation server
state = enableservice('AutomationServer',enable)
state = enableservice('AutomationServer')
enableservice('DDEServer',enable)
Note Use COM, as described in COM Support in MATLAB. The enableservice('DDEServer',enable) syntax will be removed in a future version of MATLAB. |
state = enableservice('AutomationServer',enable) enables or disables the MATLAB Automation server.
If enable is logical 1 (true), enableservice converts an existing MATLAB session into an Automation server. If enable is logical 0 (false), enableservice disables the MATLAB Automation server.
state indicates the previous state of the Automation server. If state = 1, MATLAB was an Automation server. If state is logical 0 (false), MATLAB was not an Automation server.
state = enableservice('AutomationServer') returns the current state of the Automation server. If state is logical 1 (true), MATLAB is an Automation server.
enableservice('DDEServer',enable) enables the MATLAB DDE server. You cannot disable a DDE server once it has been enabled. Therefore, the only allowed value for enable is logical 1 (true).
Enable the Automation server in the current MATLAB session:
state = enableservice('AutomationServer',true);Next, show the current state of the MATLAB session:
state = enableservice('AutomationServer')
MATLAB displays state = 1 (true), showing that MATLAB is an Automation server.
Finally, enable the Automation server and show the previous state by typing
state = enableservice('AutomationServer',true)
MATLAB displays state = 1 (true), showing that MATLAB previously was an Automation server.
Note the previous state may be the same as the current state. As seen in this case, state = 1 shows MATLAB was, and still is, an Automation server.
| elseif | end | ![]() |
© 1984-2007 The MathWorks, Inc. Terms of Use Patents Trademarks Acknowledgments