Use model.component(<ctag>).geom(<tag>).create(<ftag>,"CentroidMeasurement") to create parameters for the average position of vertices.
Use model.component(<ctag>).geom(<tag>).feature(<ftag>).selection("ent").set() to select the vertices to measure. The default selection is empty.
Use double[] parvalues = model.component(<ctag>).geom(<tag>).feature(<ftag>).getDoubleArray("parval"); to access the parameter values.