Skip to content

How to create a zoom-extents ViewPort? #187

@nzain

Description

@nzain

I'm trying to modify the active view port stored in my generated DXF file. Lets say I have a drawing with some minX, minY, maxX, maxY values. I can calculate a center and store as ActiveViewPort.ViewCenter (works). However, how can I modify width and/or height of the visible area? If you think about this, window size and aspect ratio come into play. But certainly it is always possible to zoom such that the given bounding box is fully visible (usually called zoom-extents). I don't need a perfect solution, but right now some of my drawings open "empty" because the viewport is too small. That's quite bad.

I've tried to set ActiveViewPort.ViewHeight without success, but the property documentation says "max drawing version R2004" (?).

Issue #24 lists the {{VIEWPORT}} as not done, yet. @brettfo do you think something crucial is missing?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions