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.
;;; Plot Configuration Import
;;; 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.
;;; ======= 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*)
(not (= (strcase (vla-get-name PI:EA_LAYOUT)) "MODEL"))
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.