If you want to take advantage of functionality that is provided my menu commands you can use EditorApplication.ExecuteMenuItem in your editor scripts to execute them.
Related posts
Add comment
Cancel reply to comment