Deleting specific named page setups

Discussion in 'AutoCAD' started by Gordon Price, Apr 16, 2004.

  1. Gordon Price

    Gordon Price Guest

    We have two new plotters, a B&W laser and a high end color, which will be
    replacing our single HP-1050. We have Nmed Page Setups for the old plotter,
    which will be replaced with new ones for the two ned plotters, based on
    usage.

    I am looking to programatically delete some specific Named Page setups,
    import new ones (ideally based on the names of the ones that where deleted),
    then apply 1 of those Setups to a specific layout.
    The importing I have down, and I seem to remember a post about deleting all
    Named Page Setups, but is it possible to delete just specific ones? And how
    about setting the current Named Page Setup for a layout? I would prefer to
    do this in Lisp rather than VBA, but if VBA is the only answer, so be it. If
    I remember right, most of this is addressed with Dictionaries, but I can't
    find anything in the Customization guide about WHAT dictionaries. Is there
    perhaps a slick website that documents some of this, or do you have to be
    ADN to get access to these 'inner workings'?

    This is for R2002, BTW.

    Thanks for any suggestions,
    Gordon

    Oh, I would also like to set Save Changes to Layout OFF by default. In R2005
    this 'feature' becomes a specific button you press, which is a huge
    improvement, but in the meantime I would like to make it a little harder for
    users to mank up their layouts in R2002. I can't seem to find the post that
    addressed that some time ago either.
     
    Gordon Price, Apr 16, 2004
    #1
  2. Pagesetups are stored in the plotconfiguration collection.

    Use wcmatch and vla-delete to remove specific ones.
    To set a one current use vla-copyfrom

    As for the 'save changes to layout' I have a function
    but it doesn't seem to work with 2005. They must
    have changed the way this was storted in the registry.
    At the moment I don't have time to hunt it down.
     
    Jason Piercey, Apr 16, 2004
    #2
  3. Gordon Price

    Gordon Price Guest

    Awesome, thanks.
    I don't think you need it any more. In R2002 and R2004 there was a check
    box, which was ON by default (BAD idea). In R2005 there is no longer a check
    box with a default condition, there is a button that a user has to
    specifically press to push the settings to the layout. I suspect the
    registry setting that controlled the default state of the check box is now
    gone, along with the check box.

    That said, I would love to see how you did it for older versions, as I would
    like to fix this for the month or so we have left on R2002.

    Best,
    Gordon
     
    Gordon Price, Apr 16, 2004
    #3
  4. ; Jason Piercey . 2003
    ; check or uncheck the 'save changes to layout'
    ; toggle box found at the top left corner of the
    ; plot dialog box
    ; [arg] - any value
    ; if a non nil value is supplied changes are
    ; saved otherwise changes are not saved.
    ; (SaveChangeToLayout nil) turns it off
    ; (SaveChangeToLayout T) turns it on
    ; return: T
    (defun saveChangeToLayout (arg)
    (and
    (vl-registry-write
    (strcat "HKEY_CURRENT_USER\\" (vlax-product-key)
    "\\Profiles\\" (getvar "cprofile")
    "\\Dialogs\\Plot")
    "SaveChangeToLayout"
    (if arg "true" "false")
    )
    )
    )

    .....and you are welcome.
     
    Jason Piercey, Apr 16, 2004
    #4
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.