Select [View]-[Panels]-[Python console] from the menu to display the "Python console". We will enter commands into this "Python console".
First, we need to get the object we want to measure. You can use the following command to get it by the name displayed in the model tree (= label).
target_object=App.ActiveDocument.getObjectsByLabel("The object label")[0]
Then execute the following commands to display the each values in the "Python console".
target_object.Shape.Area
target_object.Shape.Volume
target_object.Shape.CenterOfMass
Note: if the ShapeType of the shape is "Compound", the center of mass cannot be gotten in this way. To check the ShapeType of a shape, execute the following command.
target_object.Shape.ShapeType
In the case of "Compound", you can use Shape.Solids to get the center of mass of the shape's component solids.
target_object.Shape.Solids[0].CenterOfMass
target_object.Shape.Solids[1].CenterOfMass
...