So, alg.mapexport.documentStructure() returns undefined when the application is opened and a new project is created.
But if the plugin is reloaded, this problem doesn't persist. Is there a way to reload the plugin via script? or fix this error
alternately:
If the project is baked by hard coding the material name "DefaultMaterial", the error is : project not loaded. Again this error doesn't persist if the plugin is reloaded. but only prevails when the application is opened and a new project created with out reloading thew plugin.