Script wont go past LISP Command
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
USING AUTOCAD ELECTRICAL 2017
I have a script that will do the following:
1. Copy a master project into a new folder with a new name
2. Open up each drawing in the project and run a lisp function to update the titleblock
*The project has 17 sheets (I only listed the routine for the first few)*
I've narrowed down to the line that says "(setq copyproject (c:wd_...."). It does copy the project, but the script STOPS after that
it does not continue on.
*NOTE - I have separated this script to run everything below the "copyproject" line and it works great. The problem is that the SCRIPT decides to end after the that specific LISP command.
Can anyone help? I'm sure there is a more efficient way to do this - can someone provide some insight?
Thanks in advance!
(load "C:/Users/ussatdafa/Desktop/ACAD_FILES/attributes.lsp") FILEDIA 0 (setq prj "C:/Users/ussatdafa/Desktop/ACAD_FILES/master/master.wdp") (setq newpath "C:/Users/ussatdafa/Desktop/ACAD_FILES/PROCESSED/G99999-1") (setq newprj "C:/Users/ussatdafa/Desktop/ACAD_FILES/PROCESSED/G99999-1/G99999-1.wdp") (setq copyproject (c:wd_cpyprj_main (list prj newprj nil newpath "" "" nil nil))) (load "C:/Users/ussatdafa/Desktop/ACAD_FILES/attributes.lsp") (setq fdwg "C:/Users/ussatdafa/Desktop/ACAD_FILES/PROCESSED/G99999-1/001 COVER SHEET.dwg") (vla-activate (vla-open (vla-get-documents (vlax-get-acad-object)) fdwg)) (load "C:/Users/ussatdafa/Desktop/ACAD_FILES/attributes.lsp") (setq titleblock_list (list "TITLEBLOCK" '("PROJECTNUMBER" . "G99999-1") '("PROJECTNAME" . "FAKE NEW CUSTOMER (G99999-1)") '("DESCRIPTION" . "") '("DATE" . "2017-10-05") '("SIZE" . "ANSI B") '("REVISION" . "A") '("SHT1" . "1") '("SHT2" . "16") '("SEQUENCENUMBER" . "SEE SUBMITTAL") '("MODELNUMBER" . "UNIT 1"))) (m:tbatts titleblock_list) (setq fdwg "C:/Users/ussatdafa/Desktop/ACAD_FILES/PROCESSED/G99999-1/002 CUSTOMER CONNECTIONS.dwg") (vla-activate (vla-open (vla-get-documents (vlax-get-acad-object)) fdwg)) (load "C:/Users/ussatdafa/Desktop/ACAD_FILES/attributes.lsp") (setq titleblock_list (list "TITLEBLOCK" '("PROJECTNUMBER" . "G99999-1") '("PROJECTNAME" . "FAKE NEW CUSTOMER (G99999-1)") '("DESCRIPTION" . "") '("DATE" . "2017-10-05") '("SIZE" . "ANSI B") '("REVISION" . "A") '("SHT1" . "1") '("SHT2" . "16") '("SEQUENCENUMBER" . "SEE SUBMITTAL") '("MODELNUMBER" . "UNIT 1"))) (m:tbatts titleblock_list)