soohoonkim Posted August 25, 2022 Posted August 25, 2022 (edited) Hello, Below lisp code was worked few days ago. But today not working with message ; error: no function definition: FINDPLOTARA I'm beginner of lisp. This lisp code modify my self. Original code is print only select block. Modify code is get string and print as same all block. original code: (defun c:ppdf(/ currentos ss plotlist filename pdfnameprefix pdfpath pdfname vlename min max llp urp width height landscape) (setvar "cmdecho" 0) (setq currentos (getvar "osmode")) (setq ss (ssget '((0 . "insert")))) (setq plotlist (findplotarea ss)) (setq filename (getvar "dwgname")) modify code: (defun c:pdf(/ number currentos blockname found ss plotlist filename pdfnameprefix pdfpath pdfname vlename min max llp urp width height landscape ) (setvar "cmdecho" 0) (setq number 1) (setq currentos (getvar "osmode")) (setq blockname (getstring "\n Enter name block :")) (setq found (tblsearch "BLOCK" blockname)) (setq ss (ssget "X" (list (cons 2 blockname )))) (setq plotlist (findplotarea ss)) (setq filename (getvar "dwgname")) need help.!! Edited August 25, 2022 by SLW210 Code Tags!! Quote
mhupp Posted August 25, 2022 Posted August 25, 2022 findplotarea is a function that you no longer have loaded. you need that for the rest of the lisp to work. 1 Quote
Emmanuel Delay Posted August 25, 2022 Posted August 25, 2022 What the error message is telling you: This line of code invokes a self written function findplotarea. (setq plotlist (findplotarea ss)) Somewhere in your original lisp file there's a (defun findplotarea ( ....) ... ) You need to find that function definition ( defun means define function ) and copy/paste it to your new .lsp file. ... And if that function uses other self written functions, then you copy/paste them too. 1 1 Quote
soohoonkim Posted August 25, 2022 Author Posted August 25, 2022 Thank you for kindly reply. I mistake copy and paste to my own lisp. missing the definition of findplotarea. So I check original code and find that and copy and paste to my own lisp. it is work. Thank you again. 2 Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.