How to retrieve page setup names from closed drawings?

Discussion in 'AutoCAD' started by klaudiussen, Dec 6, 2004.

  1. klaudiussen

    klaudiussen Guest

    I am looking for a way to get all the page setup names from another drawing without opening it. I have found some objectDBX code here but not exactly what I was looking for. I have no experience programming in objectDBX. Is there someone that can help me filling out the missing code? Please.

    ;; step 1
    (setq odbx (vla-getinterfaceobject (vlax-get-acad-object) "ObjectDBX.AxDbDocument.16"))

    ;; step 2
    ;; open the drawing
    (vla-open odbx "C:\\Drawing.dwg")

    ;; step 3
    ;; get the "acad_plotsettings" dictionary
    Please help me with some piece of code

    ;; step 4
    ;; close the dwg by releasing the object
    (vlax-release-object odbx)

    Thanks in advance.
    \Freddy
     
    klaudiussen, Dec 6, 2004
    #1
  2. klaudiussen

    OLD-CADaver Guest

    psetupin?
     
    OLD-CADaver, Dec 6, 2004
    #2
  3. klaudiussen

    klaudiussen Guest

    I need only a list of page setup names.
    \Freddy
     
    klaudiussen, Dec 6, 2004
    #3
  4. klaudiussen

    T.Willey Guest

    This might help.

    Tim

    Reply From: Piercey, Jason
    Date: Jun/18/03 - 22:00 (PDT)

    Re: Help with Plot Configurations
    Something like this

    ; [doc] - document object
    ; return: list of strings or nil
    ; (getPlotConfigNames (vla-get-activedocument (vlax-get-acad-object)))
    (defun getPlotConfigNames (doc / names)
    (reverse
    (vlax-for x (vla-get-plotconfigurations doc)
    (setq names (cons (vla-get-name x) names))
    )
    )
    )
     
    T.Willey, Dec 6, 2004
    #4
  5. klaudiussen

    klaudiussen Guest

    Thanks a lot Jason. It worked very well. Thanks again.

    \Freddy
     
    klaudiussen, Dec 7, 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.