Trying to write a script
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi all
This is my first time trying a script so go easy on me. My intent is to open a couple hundred files and replace the titleblock. Could and expert take a look at what i have put together down below and tell me what im doing wrong?
What i am getting from this is:
1. a new folder named new
2. autocad opens up
3. says cannot find file name
Step 1 = script file
INSERTcompany P&IDTblk=e:\bctest
0,0 1 1 0
ERASE L
(load "e:\\bctest\\bctest_update.lsp")
bctest_update
QUIT
Y
step 2 = batch file
md e:\bctest\new
for %%f in (e:\bctest\A*.dwg) do START/WAIT c:\"program files"\"autodesk"\"Autocad 2015"\acad.exe "%%f"/b e:\bctest\bctest_update.scr
step 3 = lisp program
(defun e:bctest_update(/ dn pa panbdn)
(setq dn (getvar "dwgname"))
(setq pa (getvar "dwgprefix"))
(setq panbdn (strcat pa "new\\" dn))
(command "save" panbdn )
)