Copy drawing to multiple drawings and rename layouts based on drawing name.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hello,
I am trying to Copy a drawing. Rename the layout's of the drawing. Then delete the copied layout. (This includes my xref's and sheet templates).
I am copying a drawing called Site Plan. Layout tabs copy over as Site Plan 1 and Site Plan 2. I want to change Site Plan 1 to Demolition 1 and Site Plan 2 to Demolition 2. The commands work, but it creates the layouts in the Site Plan Drawing. I want to be able to do it in the other drawings that are copied. Do I need to create a file path?
Here is what I got,
(defun C:CopyD ()
(command ".save" (strcat (getvar 'dwgprefix) "19000 DEMOLITION"))
(command "_-layout" "_rename" "" "DEMOLITION") // here is my problem
(command "_.layout" "Delete" "SITE PLAN 1") // here is my problem
(command "_.layout" "Delete" "SITE PLAN 2") // here is my problem
(command ".save" (strcat (getvar 'dwgprefix) "19000 HORIZONTAL CONTROL"))
(command ".save" (strcat (getvar 'dwgprefix) "19000 ROAD PROFILES"))
(command ".save" (strcat (getvar 'dwgprefix) "19000 GRADING AND DRAINAGE"))
(command ".save" (strcat (getvar 'dwgprefix) "19000 UTILITIES AND CONDUIT"))
(command ".save" (strcat (getvar 'dwgprefix) "19000 STRIPING AND SIGNAGE"))
(command ".save" (strcat (getvar 'dwgprefix) "19000 EROSION AND CONTROL"))
(command ".save" (strcat (getvar 'dwgprefix) "19000 DETAILS"))
);