• Industries
  • Products
  • Buy
  • Services & Support
  • Communities
  • Visual LISP, AutoLISP and General Customization

    Reply
    Distinguished Contributor
    Posts: 145
    Registered: ‎04-09-2008

    Updating Plot Configurations

    74 Views, 1 Replies
    03-25-2009 07:58 AM
    Hello All,
    I hope someone can take the mystery out of these plot configurations.The problem is now some of those page setups are changing. Say we got a new plotter or just new drivers.
    I would like the current page setup names the same but update the settings.
    What I usually do is this:
    1. Delete all the page setups by using the vla-delete (I know this method is not endorsed by the help menu)
    2. Import the new page setups with the same configuration name
    This is the problem: Now I have plot configurations with the right settings but they are not applied to the layout. I cannot seem to find a way to "get" and "put" plot configs to a layout. Is this possible? I need to see if the plot config name is applied to a layout. If the plot config on the layout meets my conditions then apply the new plot config to that layout.

    Thanks,
    -Russell

    [begin code]
    ;;; Plot Configuration Import

    (vl-load-com)

    ;;; get preferences files for printer locations
    (setq PI:ACAD_FILES (vla-get-files (vla-get-preferences (vlax-get-acad-object))))

    ;;; get acitve document
    (setq *ACAD_DOCUMENT* (vla-get-activedocument(vlax-get-acad-object)))

    ;;; ======= plot configurations in the drawing =========================================
    ;;; ======= plot configurations are the page setups for the drawing. ===================
    (vlax-for PI:EA_PLOT_CONFIGURATION (vla-get-plotconfigurations *ACAD_DOCUMENT*)

    ;;; I can delete them but if the page setup is applied to the layout it will remain ==
    ;;; I know they took this method out of the help file because it leaves the remnants =
    ;;; of the plot configs that have been associated with the layouts.

    ;;; (vla-delete PI:smileytongue:AGESETUPS)
    (vlax-dump-object PI:EA_PLOT_CONFIGURATION)
    );_end vlax-for


    ;;; ======= These plot configs are paper space only =====================================
    ;;; ======= I can get the layout but I can't seem to find the ==========================
    ;;; ======= plot configurations associated with the layout. =============================
    ;;; ======= I need to override the exisiting plot cofigurations associcated. ============
    ;;; ======= with the layout. ============================================================
    ;;; ======= It is looking like I need to copy all the settings from the =================
    ;;; ======= plot configurations and change each one in the layout since I can't update===
    ;;; ======= it like a block when it is overridden. ======================================
    (vlax-for PI:EA_LAYOUT (vla-get-layouts *ACAD_DOCUMENT*)
    (if
    (not (= (strcase (vla-get-name PI:EA_LAYOUT)) "MODEL"))
    (PROGN
    (vlax-dump-object PI:EA_LAYOUT)
    )
    )
    );_end vlax-for

    [end code]
    Please use plain text.
    Distinguished Contributor
    Posts: 145
    Registered: ‎04-09-2008

    Re: Updating Plot Configurations

    03-25-2009 01:12 PM in reply to: Redraiderr2009
    To make it easier to understand I need to be able to read the name of the page setup associated with the layout. Once all page setups are deleted I need to find out which page setup was used. Or read them before they are deleted. Find the attached image to see what I mean. There is no more 24x36-L-Full-Bond pagesetups.
    Thanks,
    -Russell
    Please use plain text.