【CorelDraw VBA 001例】 缩放到选定节点
Sub ZoomToNodes()
'##缩放到选定节点
Dim nr As NodeRange
Dim x As Double, y As Double, w As Double, h As Double
Set nr = ActiveShape.Curve.Selection
nr.GetBoundingBox x, y, w, h
ActiveWindow.ActiveView.ToFitArea x, y, x + w, y + h
ActiveWindow.ActiveView.SetViewPoint x + w / 2, y + h / 2, ActiveWindow.ActiveView.Zoom / 2
End Sub
浙公网安备 33010602011771号