Set default documentation location programmatically in R2021A
Mostrar comentarios más antiguos
Starting in R2021a, when you run MATLAB with an internet connection, the Help browser displays the web documentation by default. When you run MATLAB on a system without an internet connection, or if your internet connection becomes unavailable, the Help browser displays the installed documentation instead.
To change the default documentation location, on the Home tab, in the Environment section, click Preferences. Select MATLAB > Help and change the Documentation Location.
I would like to know what is the code to change the documentation location programmatically.
I thought it was something like
com.mathworks.mlservices.MLHelpServices.setDocCenterDomain
but I could not find it
Thank you in advance
Marco
Respuestas (1)
Anmol Dhiman
el 7 de Abr. de 2021
0 votos
Hi Marco,
This is controlled by the matlab.help.DocCenterLocation setting. The valid values are "WEB" or "INSTALLED":
>> s = settings;
>> s.matlab.help.DocCenterLocation.PersonalValue = 'WEB';
Please note that this not a documented functionality and might not work in future releases.
Hope it Helps
8 comentarios
Marco Riani
el 7 de Abr. de 2021
Editada: Marco Riani
el 8 de Abr. de 2021
Aldo Corbellini
el 8 de Abr. de 2021
I tried it as well on MATLAB 2021a and I can confirm that this setting is not working.
Changing programmatically the documentation location between 'INSTALLED' and 'WEB' would be a really important feature, given that in the 2021a release if you choose oprion WEB -which is now the default- you cannot find the documentation of third party toolboxes.
Aldo
Adam Danz
el 8 de Abr. de 2021
Instead of using s.matlab.help.DocCenterLocation
try setting s.matlab.help.DocCenterLocation21a
Also, instead of setting the PersonalValue property which will make a change to your matlab.prf file, I recommen using a startup script and within startup.m, set the TemporaryValue property which will persist until Matlab is closed. Undocumented changes to the preference file often leads to really slow startup times and other instabilities.
Marco Riani
el 9 de Abr. de 2021
Adam Danz
el 12 de Abr. de 2021
The ActiveValue is read-only. If a TemporaryValue is set, the ActiveValue copies the TemporaryValue. If the Temp value is not set and the PersonalValue is set, then the ActiveValue copies the PersonalValue. If neither the Temp or Personal values are set, then the ActiveValue copies the FactoryValue. This is explained in the documentation:
So, it sounds like setting the PreferredValue is what you want to do but I don't know anything about the problem of needing to restart Matlab.
Marco Riani
el 13 de Abr. de 2021
Gian23
el 21 de Abr. de 2021
This is just to confirm that the instruction:
s.matlab.help.DocCenterLocation21a.PersonalValue='INSTALLED'
or
s.matlab.help.DocCenterLocation21a.TemporaryValue ='INSTALLED'
does not take effect immediately. I'm using Matlab 2021a on a Mac OSX.
Thanks in advance
Aldo Corbellini
el 17 de Dic. de 2021
I confirm that for some unknow reason, the following property:
s.matlab.help.DocCenterLocation21a.PersonalValue='INSTALLED'
or
s.matlab.help.DocCenterLocation21a.TemporaryValue ='INSTALLED'
works only if you restart MATLAB. It would be nice if this was not necessary.
It also would be nice if this instant effect could become a feature request in a future MATLAB release.
Categorías
Más información sobre Introduction to Installation and Licensing en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!