What is the difference between the NewMLApp.MLApp and CreateObject methods of creating a MATLAB ActiveX server from Visual Basic?
1 view (last 30 days)
Show older comments
There are two ways mentioned in the MATLAB Documentation to start a MATLAB ActiveX Automation Server:
Set Matlab=NewMLApp.MLApp
and
Set Matlab=CreateObject(“matlab.application” ).
I would like to know what the difference is between them.
Accepted Answer
MathWorks Support Team
on 27 Jun 2009
The difference is that you need to add a reference in the first method, but not the second. Also, using the first method means you can use Visual Basic IntelliSense® ,
For example in the first case::
Set Matlab=NewMLApp.MLApp
You must add a reference to the MATLAB type library in your Visual Basic project. You can do this by clicking Project->References on the main menu.
If you use:
Set Matlab=CreateObject(“matlab.application” ).
You do not need to add a reference.
0 Comments
More Answers (0)
See Also
Categories
Find more on ActiveX in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!