【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

  

posted @ 2021-11-24 08:40  岳帆(SoSo)  阅读(218)  评论(0)    收藏  举报