Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to create a zoom-extents ViewPort? #187

Open
nzain opened this issue Sep 5, 2022 · 0 comments
Open

How to create a zoom-extents ViewPort? #187

nzain opened this issue Sep 5, 2022 · 0 comments

Comments

@nzain
Copy link
Contributor

nzain commented Sep 5, 2022

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant