actxcontrol and actxserver: Future support plans?
Afficher commentaires plus anciens
The web-documentation for Matlab's actxcontrol( ) command warns that the command is to be removed in "a future release." In contrast, the web-documentation for the actxserver( ) command shows no such warning.
1. Is there an announced time-frame for removing the actxcontrol( ) command?
2. Will the actxserver( ) command continue to be supported even after the actxcontrol( ) command is removed?
3. If the actxserver( ) command is to be removed, what is to replace it, and where is the documentation for that replacement?
Thanks.
Réponses (1)
Steven Lord
le 16 Avr 2021
1 vote
1. Is there an announced time-frame for removing the actxcontrol( ) command?
If you're looking for something more concrete than "in a future release" then no.
2. Will the actxserver( ) command continue to be supported even after the actxcontrol( ) command is removed?
When or if that command were to be removed I expect we would announce the removal in advance of actually removing it. We have made no such announcement at this time as far as I'm aware. Note that the documentation for actxcontrol states we started warning about its future removal in release R2019b and the current release is R2021a. We didn't yank the rug out from under users of actxcontrol.
Note also that the background linked from the compatibility considerations section of the actxcontrol page states "The undocumented JavaFrame property and javacomponent function, as well as the actxcontrol function, are capabilities that rely on third-party technologies (Java Swing and Microsoft COM, respectively), which over the years, have become legacy UI frameworks. "
Is actxserver a UI framework? The actxcontrol documentation page states "You cannot use an ActiveX server for the progid because MATLAB® cannot insert ActiveX servers in a figure." so I personally would say probably not.
3. If the actxserver( ) command is to be removed, what is to replace it, and where is the documentation for that replacement?
Since we have not announced any such removal, I think the rest of the question is moot.
10 commentaires
Bruce Peters
le 16 Avr 2021
Walter Roberson
le 16 Avr 2021
No, Mathworks will eventually get rid of actxserver() support. I have no idea of the timeline, but it will happen... because Microsoft will be getting rid of ActiveX.
Bruce Peters
le 22 Avr 2021
Walter Roberson
le 22 Avr 2021
The technologies will be going away.
It will be gone by the time of the 50th anniversary of MATLAB.
Viktor Janzen
le 23 Avr 2021
Modifié(e) : Viktor Janzen
le 23 Avr 2021
I upgraded yesterday to R2021a and from now it throws an error if I want to start a MATLAB-function through ActiveX. My VBA-Code is like this:
'Connection to Matlab
Set MATLAB = CreateObject("Matlab.Application")
MATLAB.Execute ("cd('D:\main code\SpecialPath')") ' change Directory
'Konvert my data
command = "KonvertALL('D:\Customer_1\data.csv')"
MATLAB.Execute (command)
If ActiveX is not still recommended and the behaviour changed in R2021a, I want to repeat the question from Bruce Peters: what is to replace the actxserver / actxcontrol, and where is the documentation for that replacement?
Steven Lord
le 23 Avr 2021
What is the full and exact text of the error message you receive when you run that code?
Walter Roberson
le 23 Avr 2021
MATLAB.Execute would use the automation server, which is the opposite direction than actxserver / actxcontrol. The automation server requires that you register as a COM server; see https://www.mathworks.com/help/matlab/matlab_external/register-matlab-as-automation-server.html
Viktor Janzen
le 23 Avr 2021
Modifié(e) : Viktor Janzen
le 23 Avr 2021
Ooh. Thanks. That was the point. After I registered the comserver, the code is runnig like usual.
Bruce Peters
le 23 Avr 2021
Walter Roberson
le 23 Avr 2021
Yes, both are COM. And we have no statement from Mathworks that the automation server will definitely be included in all future MATLAB.
MATLAB has another automation interface that does not use COM at all, but does require linking to MATLAB using DLL type of technology. This is not inherently compatible with the current implementation MATLAB.execute that vj used.
Catégories
En savoir plus sur Use COM Objects in MATLAB dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!