Message 1 of 3

Not applicable
10-21-2016
11:32 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hello everyone 🙂 I have a long list of blocks to be inserted (100+). How can I structure my lisp to place part of the filepath in setq? e.g. This is what I have now: (defun c:001 () (command ".-insert" "C:\\folder1\\folder sub1\\folder sub2\\BLK001.dwg" pause 1 1 0 "x" "xx" "xxx")) (defun c:002 () (command ".-insert" "C:\\folder1\\folder sub1\\folder sub2\\BLK002.dwg" pause 1 1 0 "x" "xx" "xxx")) (defun c:003 () (command ".-insert" "C:\\folder1\\folder sub1\\folder sub2\\BLK003.dwg" pause 1 1 0 "x" "xx" "xxx")) (defun c:004 () (command ".-insert" "C:\\folder1\\folder sub1\\folder sub2\\BLK004.dwg" pause 1 1 0 "x" "xx" "xxx")) (defun c:005 () (command ".-insert" "C:\\folder1\\folder sub1\\folder sub2\\BLK005.dwg" pause 1 1 0 "x" "xx" "xxx")) (defun c:006 () (command ".-insert" "C:\\folder1\\folder sub1\\folder sub2\\BLK006.dwg" pause 1 1 0 "x" "xx" "xxx")) (defun c:007 () (command ".-insert" "C:\\folder1\\folder sub1\\folder sub2\\BLK007.dwg" pause 1 1 0 "x" "xx" "xxx")) What I'm after: (defun commonpath () (setq TBFile "C:\\folder1\\folder sub1\\folder sub2\\") ) (defun c:001 () (command ".-insert" "(commonpath) BLK001.dwg" pause 1 1 0 "x" "xx" "xxx")) (defun c:002 () (command ".-insert" "(commonpath) BLK002.dwg" pause 1 1 0 "x" "xx" "xxx")) (defun c:003 () (command ".-insert" "(commonpath) BLK003.dwg" pause 1 1 0 "x" "xx" "xxx")) (defun c:004 () (command ".-insert" "(commonpath) BLK004.dwg" pause 1 1 0 "x" "xx" "xxx")) (defun c:005 () (command ".-insert" "(commonpath) BLK005.dwg" pause 1 1 0 "x" "xx" "xxx")) (defun c:006 () (command ".-insert" "(commonpath) BLK006.dwg" pause 1 1 0 "x" "xx" "xxx")) (defun c:007 () (command ".-insert" "(commonpath) BLK007.dwg" pause 1 1 0 "x" "xx" "xxx")) Thanks in advance 🙂
Solved! Go to Solution.