Saved page setup

Discussion in 'AutoCAD' started by Jason Peterson, Dec 16, 2003.

  1. Is there a way to determine via VLISP if a drawing has a saved page setup
    rather than the default page setup?

    Jason
     
    Jason Peterson, Dec 16, 2003
    #1
  2. Yes there is. Try the following, if it returns NIL then there
    are no saved pagesetups.

    ; [document] - document object
    ; return: list of strings or nil
    ; example:
    ; (getPlotConfigNames (vla-get-activedocument (vlax-get-acad-object)))
    (defun getPlotConfigNames (document / names)
    (reverse
    (vlax-for x (vla-get-plotconfigurations document)
    (setq names (cons (vla-get-name x) names))
    )
    )
    )
     
    Jason Piercey, Dec 16, 2003
    #2
  3. Jason,

    Thanks for the quick response. Do you know, is there also a way to simply
    see if a paperspace layout has a saved page setup that is not necessarily a
    named page setup? Also, do you know where the vla-get functions are
    documented? I can't seem to find it.

    Jason

    Yes there is. Try the following, if it returns NIL then there
    are no saved pagesetups.

    ; [document] - document object
    ; return: list of strings or nil
    ; example:
    ; (getPlotConfigNames (vla-get-activedocument (vlax-get-acad-object)))
    (defun getPlotConfigNames (document / names)
    (reverse
    (vlax-for x (vla-get-plotconfigurations document)
    (setq names (cons (vla-get-name x) names))
    )
    )
    )
     
    Jason Peterson, Dec 16, 2003
    #3
  4. Not sure I understand how a layout could have a
    pagesetup but not be named. Could you give an
    example of that? As for the vla* functions you will
    have to look at the ActiveX and VBA reference
    and translate them from VBA to LISP syntax.

    If you type in VLIDE at the command line, push the
    APROPOS button (looks like an A in a set of ( )
    you can type in vla and it should list them.
     
    Jason Piercey, Dec 16, 2003
    #4
  5. Thanks for the vla tip. Concerning the page setups issue, when a user does
    a PageSetup command while in a layout tab, sets the parameters, and hits OK,
    the print setup is saved with the layout tab. This may or may not be a
    named page setup in the drawing file. I need to know when they've actually
    saved a page setup versus AutoCAD using the default settings for a layout.
    I think you have me headed in the right direction though.

    Jason

    Not sure I understand how a layout could have a
    pagesetup but not be named. Could you give an
    example of that? As for the vla* functions you will
    have to look at the ActiveX and VBA reference
    and translate them from VBA to LISP syntax.

    If you type in VLIDE at the command line, push the
    APROPOS button (looks like an A in a set of ( )
    you can type in vla and it should list them.
     
    Jason Peterson, Dec 16, 2003
    #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.