Is there a way with Ghpython to focus at specific x,y coordinates on the canvas?
You need to get and call the method on the active canvas, using a
PointF as the argument:
import Grasshopper as gh from System.Drawing import PointF gh.Instances.ActiveCanvas.Viewport.Focus(PointF(0,0))
Thank you very much
I try with component pivot but when the canvas zoomed in or out focus don’t point at the component
test.gh (3.0 KB)
v = gh.Instances.ActiveCanvas.Viewport gh.GUI.Canvas.GH_Viewport.Zoom.SetValue(v,1)