setting LIMMIN and LIMMAX

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

  1. jclaidler

    jclaidler Guest

    The below program works with AutoCAD 2000i, but not with AutoCAD 2005. How can I get this to work with A2K5.

    Thanks.

    (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)
     
    jclaidler, Aug 16, 2004
    #1
  2. jclaidler

    T.Willey Guest

    (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)

    The items you want to put you use single quote (vlax-put object 'Properity value)

    Tim
     
    T.Willey, Aug 16, 2004
    #2
  3. jclaidler

    jclaidler Guest

    I still get this error:

    Cannot set LIMMIN when paper margins or background are displayed.
     
    jclaidler, Aug 16, 2004
    #3
  4. jclaidler

    T.Willey Guest

    (getvar "extmin") <- this returns (x y z)
    When I tested stuff on my computer, "limmin" wants only (x y), so try this.
    (setq oextmin (getvar "extmin")
    oextmin (reverse (reverse (cdr oextmin)))
    )
    (setq oextmax (getvar "extmax")
    oextmax (reverse (reverse (cdr oextmax)))
    )

    (setvar "limmin" oextmin)
    (setvar "limmax" oextmax)
    This should work.

    Tim
     
    T.Willey, Aug 16, 2004
    #4
  5. jclaidler

    Jürg Menzi Guest

    Works for me in A2k5... are there reactors they try to modify the limits?

    Limits can't be changed under some circumstances (from Help):
    LIMMIN/LIMMAX is read-only when paper space is active and the paper background
    or paper margins are displayed.

    Cheers
     
    Jürg Menzi, Aug 17, 2004
    #5
  6. jclaidler

    jclaidler Guest

    I know. Thats why I'm doing this in the program before setting the limits.

    (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)
     
    jclaidler, Aug 17, 2004
    #6
  7. jclaidler

    Jürg Menzi Guest

    Hi jclaidler
    Ah... I see, seems to be a bug in A2k5. If you change this properties by code,
    they aren't active until you open/close the preferences dialog... ugly.

    Cheers
     
    Jürg Menzi, Aug 17, 2004
    #7
  8. jclaidler

    jclaidler Guest

    Yeah..seems like that.
    Thanks for the help, from across the pond.
     
    jclaidler, Aug 17, 2004
    #8
  9. jclaidler

    jclaidler Guest

    Actually, doing a REGEN after the code will update the display. But LIMMIN and LIMMAX still have be changed via lisp.
     
    jclaidler, Aug 17, 2004
    #9
  10. jclaidler

    jclaidler Guest

    looks like you have to accomplish it this way....

    (command "limits" (getvar "extmin") (getvar "extmax"))
     
    jclaidler, Aug 17, 2004
    #10
  11. jclaidler

    Jürg Menzi Guest

    Hi jclaidler
    Yeah, made this try also:
    (vla-Regen *ActDoc* acAllViewports)
    but doesn't change anything except updating the display...>8-(

    Cheers
     
    Jürg Menzi, Aug 17, 2004
    #11
  12. jclaidler

    jclaidler Guest

    This is a pretty bad bug. I still can't change the limits, even by doing this:

    (command "limits" (getvar "extmin") (getvar "extmax"))
     
    jclaidler, Aug 17, 2004
    #12
  13. This entire topic begs the question: why bother? Why not simply plot using
    the Layout option and stop worrying about setting limits? We haven't had
    trouble plotting since AutoCAD 2000, but then, we dropped all our old ways
    of plotting and jumped on to the Layout bandwagon. Sure has made our life
    easier in the long run.

    But thanks for highlighting the bug, I guess... ;^)

    --
    R. Robert Bell


    The below program works with AutoCAD 2000i, but not with AutoCAD 2005. How
    can I get this to work with A2K5.

    Thanks.

    (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)
     
    R. Robert Bell, Aug 17, 2004
    #13
  14. jclaidler

    jclaidler Guest

    ok.. here it is.

    We plot by EXTENTS. But our German parent company plots by limits. When the go to plot our drawings, they get bad plots because we don't set limits in paperspace.

    What I want is to setup AutoCAD to automatically set the limits when we open a drawing.

    Is this ok with you ??
     
    jclaidler, Aug 17, 2004
    #14
  15. Well, if both of your firms converted to Layouts, the issue would go away.
    Is that ok with you? ;^)

    --
    R. Robert Bell


    ok.. here it is.

    We plot by EXTENTS. But our German parent company plots by limits. When
    the go to plot our drawings, they get bad plots because we don't set limits
    in paperspace.

    What I want is to setup AutoCAD to automatically set the limits when we open
    a drawing.

    Is this ok with you ??
     
    R. Robert Bell, Aug 17, 2004
    #15
  16. jclaidler

    jclaidler Guest

    Actually, no. The people in our German company will never change there ways. They're too stubborn. lol

    This would be the easiest way, and both 'firms' wouldn't have to change a thing. It was hard enougth to get 'my company' to adopt paper space.
     
    jclaidler, Aug 18, 2004
    #16
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.