Message 1 of 7
Not applicable
01-07-2021
11:57 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi im trying to make a lisp that inserts a block with a preset path so I don't have to look through my files every time to insert this block I use a lot. this is what I have so far but, I cant seem to get it right.
(DEFUN C:erosion10 ( / block_name)
(setq block_name
(cond
((tblsearch "block" "erosion 10") "erosion 10")
((findfile (strcat (getvar 'dwgprefix) "X:\\Justin Gonzalez\\blocks\\erosion 10.dwg")))
(T nil)
)
)
(if block_name
(command "_insert" block_name)
(princ "\nblock name 'erosion 10' not found. ")
)
(PRINC)
)
Solved! Go to Solution.