Is it it possible to execute a mel command in C++, if so: How do you do it?
MGlobal::executeCommand
g-
As you mentioned there is a problem when executing scripts from a plugin while it is running. Since the interface isn't updated during the execution of the plugin. But isn't there anyway to force updating of the interface?
I have no idea if these will work, but you could try M3DView::refresh or the MEL command pause.