Could you delete all paper space layouts, and then insert your new one?
Well, as I mentioned, there are some I need to keep. Mostly from the newer details, but it isn't in all the details so I can't just recreate it later.
I know the names of all of the layouts to be deleted, mainly "Layout1", "8.5 x 11", & "Detail1". But I also know that these three layouts are NOT in all the details either, they vary. The layouts I need to keep have names like: "ConnPlate1", "PierReinf1", etc.
Now maybe put the names in a dialog box, and then ask the user which ones to delete, and then delete them, using the object. Something of an example (without a dialog box, using the code above).
...
Hope this helps.
Ohhh, oh, oh, oh, ... Doht !!! Now I understand where a confusing dialog is taking place.
Ok, this project here is also part of another question I had in this forum as well.
http://www.theswamp.org/index.php?topic=15024.0 I am updating a mass of details (somewhere's in the neighborhood of 400 +) and am creating this to be totally automated. I will be running a lisp that will create a script you taught me about, and that will run this routine to clean up the details.
So, I don't want any user input stuff going on, otherwise it defeats the purpose of this project.
The only user input is at the beginning of the script creating lisp, asking the type of detail to be updated. The user (me) inputs FTG for footing and the lisp goes out, gets all the footing details, creates the script and then runs the script which will access this routine we are currently discussing.
This routine we are discussing here is to purge everything, set layer to zero, color to bylayer, etc. It creates the office's new layer standard & converts the items on the old layers to the new. It creates two text styles, and a dimension style (depending on the dimscale - assuming the detail was drawn to a scale), & puts the dimension strings & leaders to the new style. It then imports a new paperspace layout complete with plotting configurations & such. It then deletes any old, voided layouts, while keeping the pertinent ones, setting the new layout as current, zooming the detail to it's scale and dropping the name of the detail into the title.
The script saves it, closes it, and opens the next detail.
It's quite lengthy, but it's good practice. I spent four days updating details and schedules manually and realized I'd be at it for the next six months if I didn't automate the process. Six months without making the company any money is unacceptable. :doa: