Adjusting opened drawings windowsize

Discussion in 'AutoCAD' started by Marcel Janmaat, Dec 15, 2004.

  1. Hello,

    Is it posible, or might there be a way to adjust the window of an opened
    drawing to the limits (or extents) of the drawing itself?

    M
     
    Marcel Janmaat, Dec 15, 2004
    #1
  2. Not exactly Bill.
    I Want it the way arround.
    To adjust the window to the extens of the object.
    This has to do with the slides I'm generating automatically.

    I'm not sure if this is possible.

    Marcel
     
    Marcel Janmaat, Dec 15, 2004
    #2
  3. Marcel Janmaat

    Dann Guest

    In AutoCAD 2005 you can zoom to an Object


     
    Dann, Dec 15, 2004
    #3
  4. Marcel Janmaat

    BillZ Guest

    What "window" do you mean?

    AutoCAD window? Viewport window? Zoom window?

    Bill
     
    BillZ, Dec 15, 2004
    #4
  5. In that case you should make the drawing's window one size, and use that
    single window to generate all the slides, for a consistent look. Otherwise,
    your slides may vary in quality.

    --
    R. Robert Bell


    Not exactly Bill.
    I Want it the way arround.
    To adjust the window to the extens of the object.
    This has to do with the slides I'm generating automatically.

    I'm not sure if this is possible.

    Marcel
     
    R. Robert Bell, Dec 15, 2004
    #5
  6. The window of the opened drawing. (The window within the AutoCAD window)
     
    Marcel Janmaat, Dec 15, 2004
    #6
  7. The blocks I'm generating the slides from are the same size.
    But the window is not always. I realy need the drawingwindow to adjust it's
    size to the drawings extents. That would be a lot more simple for me.

    M
     
    Marcel Janmaat, Dec 15, 2004
    #7
  8. Sorry!

    Don't have 2005 yet!

     
    Marcel Janmaat, Dec 15, 2004
    #8
  9. Marcel Janmaat

    Tom Smith Guest

    Just open the drawing and do a zoom extents. To prevent the slide looking
    crowded, you can also do a zoom .9x afterwards, to zoom out just a little
    more. Then make the slide. This is easy to automate.
     
    Tom Smith, Dec 15, 2004
    #9
  10. You don't understand.
    I'm talking about the window of the opened drawing.
    If you have the drawingwindow opend like rectangular the slide wil look
    different than when your drawingwindow is opend like a square. If yo know
    what I mean. It has nothing to do with zooming.

    M
     
    Marcel Janmaat, Dec 15, 2004
    #10
  11. Marcel Janmaat

    Dann Guest

    Try something like this then:

    (defun DB_GetAdoc (/ acadobj adoc)
    ;;usage = (setq adoc(DB_GetAdoc))
    (setq acadobj (vlax-get-acad-object))
    (setq adoc (vla-get-ActiveDocument acadobj))
    adoc
    ;;returns result for use in calling program
    )

    ;;_________________
    ;;end tools section
    ;;_________________

    (defun adjwindow()
    (setq adoc(db_GetAdoc))
    (vla-put-Width adoc 1000)
    (vla-put-Height adoc 400)
    )
     
    Dann, Dec 15, 2004
    #11
  12. Marcel Janmaat

    Dann Guest

    Is That the window you mean?

     
    Dann, Dec 15, 2004
    #12
  13. Marcel,

    That is what I was trying to explain. The easiest way to take care of it is
    to *not* maximize AutoCAD's application window, but *do* maximize the
    drawing's window. Turn off all toolbars and size the _application_ window to
    the desired aspect ratio/size. Then open all your drawings in the maximized
    _drawing_ window, zoom extents, make your slide. Wash, rinse, repeat.

    --
    R. Robert Bell


    You don't understand.
    I'm talking about the window of the opened drawing.
    If you have the drawingwindow opend like rectangular the slide wil look
    different than when your drawingwindow is opend like a square. If yo know
    what I mean. It has nothing to do with zooming.

    M
     
    R. Robert Bell, Dec 15, 2004
    #13
  14. Marcel Janmaat

    Josh Guest

    If you maximize the drawing window it will "lock" with the AutoCAD window
    and you can adjust the AutoCAD window to the shape you want and the drawing
    window will follow...then every drawing opened will automatically have the
    same drawing window ratio. Now, all your slides will be proportioned the
    same.
     
    Josh, Dec 15, 2004
    #14
  15. Yes!
    But it adjusts only in height.
    I want the objects in the drawing (extents) to fit exactly in the window.

    M
     
    Marcel Janmaat, Dec 15, 2004
    #15
  16. Marcel Janmaat

    Tom Smith Guest

    I tend to agree with Robert. You can manually size the application window to
    suit, then maximize the drawing window, then use my zooming suggestion.

    Alternatively, Dann has posted a routine to precisely size the drawing
    window, but you'll have to do this in every drawing you open.

    Depending on your intended use of the slides, extreme precision in setting
    the aspect ratio probably isn't going to matter anyway, so Robert's
    suggestion would be the simpler one. In image menus, I believe the size and
    proportion is fixed, and your slides will be stretched to fit. In a dialog
    box, I believe the representaion is controlled by the dcl. Either way, if
    the proportions of your slides is "close enough" and if they're consistent,
    that's as good as it gets.
     
    Tom Smith, Dec 15, 2004
    #16
  17. Nope!
    This will not helping me in my case beceause the size of the drawing I want
    to create the slide fom is allmost square. An then i'd have two blank areas
    on each side, wich I don't want.

    M

    See Dann's answer. He's getting me in the right direction.

    M
     
    Marcel Janmaat, Dec 15, 2004
    #17
  18. Marcel Janmaat

    Dann Guest

    That is because the numbers 1000 and 400 are screen resolution based.
    You would have to adjust them to match your wants.
     
    Dann, Dec 15, 2004
    #18
  19. See my answer at Josh's reply.

     
    Marcel Janmaat, Dec 15, 2004
    #19
  20. Marcel Janmaat

    Tom Smith Guest

    Then take the aspect ratio of the extents of your drawings, and apply it to
    the width and height in Dann's routine.
     
    Tom Smith, Dec 15, 2004
    #20
Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.