How can I get the centroid of a surface and show it in a dialogue box?
Below is a script that does that
from System.Windows.Forms import Application, Button, Form, TextBox, Label, MessageBox
selected_items = Selection.GetActive().Items
for selected_item in selected_items:
if isinstance(selected_item, DesignFace):
sel_i = Selection.Create(selected_item)