Please tell me how to ungroup with a script
I am not sure when it was implemented but as of V24.1 there is a method on the folder object for this:
MyFolder.Ungroup()
This will do what the UI option is doing. Keep in mind this method is on the folder object, not the objects in the folder.
@Mike.Thompson Thank you! I was able to execute it even in Ver23.1.