If possible, add a “ClearAnalysisMeshes” command that would remove all analysis meshes from the file but will preserve the render meshes. Doing so, the models in the scene will remain intact and the viewport will stay in a shaded mode rather than forcing Rhino to switch to a wireframe mode. Analysis meshes are a huge burden to file size when saving or opening 3dm files. A single surface consisting a dense analysis mesh could cause the file size to grow to an extreme amount of Megabytes.
I’m aware of the existing “ClearAllMeshes” command, but what it does is to clear all the meshes including render meshes, which is unwanted when the idea is to get rid of the analysis meshes only and prevent re-calculation of the render mesh of every object in the scene. The latter is especially disturbing with plenty of hidden objects or objects assigned to hidden layers.