Hi,
Here’s a sample code how to select a shape by its name (you can use also its ID or UniqueID) and center the viewport on it:
// Get the shape and select it
NShape shape = (NShape)document.ActiveLayer.GetChildByName("MyShape");
view.Selection.SingleSelect(shape);
// Center the viewport at the shape's center
NPointF origin = view.ViewportOrigin;
NPointF offset = shape.Center - view.Viewport.Center;
view.ViewportOrigin = new NPointF(origin.X + offset.X, origin.Y + offset.Y);
Best Regards,
Nevron Support Team