set LIMMAX

Discussion in 'AutoCAD' started by jclaidler, Aug 9, 2004.

  1. jclaidler

    jclaidler Guest

    What I need, is to auto-set the limits of a drawing.
    How could I accomplish this by setting LIMMAX by using the 'zoom extents' command ??

    Thanks.
     
    jclaidler, Aug 9, 2004
    #1
  2. jclaidler

    Tom Smith Guest

    What I need, is to auto-set the limits of a drawing.
    command ??

    If I understand your question , (command "zoom" "extents") will regen to the
    current drawing extents. Then you could use (setvar "limmin" (getvar
    "extmin")) and (setvar "limmax" (getvar "extmax")) to make them agree. Maybe
    you want to combine these operations? Then I'd suggest a keyboard macro
    named ZE or somthing similar.
     
    Tom Smith, Aug 9, 2004
    #2
  3. jclaidler

    jclaidler Guest

    Thanks. I've tried this though, it still doesn't reset the LIMMAX.
     
    jclaidler, Aug 9, 2004
    #3
  4. jclaidler

    jclaidler Guest

    The problem is with paperspace.
    I need to turn off the paper background and margins temporarily, then run your 'program'. After this is done, then turn the paper margin back on.

    What are the variables the control 'display paper margins' ??
     
    jclaidler, Aug 9, 2004
    #4
  5. jclaidler

    jclaidler Guest

    This is what I came up with, and it seems to work.

    (vlax-put (vla-get-display (vla-get-preferences (vlax-get-acad-object))) "LayoutDisplayPaper" 0)
    (vlax-put (vla-get-display (vla-get-preferences (vlax-get-acad-object))) "LayoutDisplayMargins" 0)

    (command "zoom" "extents")

    (command "limmin" (getvar "extmin"))
    (command "limmax" (getvar "extmax"))

    (vlax-put (vla-get-display (vla-get-preferences (vlax-get-acad-object))) "LayoutDisplayPaper" -1)
    (vlax-put (vla-get-display (vla-get-preferences (vlax-get-acad-object))) "LayoutDisplayMargins" -1)
    (command "regen")
     
    jclaidler, Aug 9, 2004
    #5
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.