phillyphantom Posted February 18, 2010 Posted February 18, 2010 Hello, I am new to all these lisp routines but when I had a problem using the FLATTEN command I read of a lisp command that works better. I saved it as "flattening.LSP" and was able to lead the lisp in my drawing. It says that i was successful but when I type in "flattening" into the command line it says that it is an unknown command. I followed the tutorial on this website but for some reason it is not working. What am I doing wrong? Thanks Quote
c2designkitchen Posted February 18, 2010 Posted February 18, 2010 Hello. I'm new with Lisps too, but wizman wrote one for me and gave me some great instructions on loading them. Here are the steps: Save the text file as (filename).lsp Type 'Appload' in the command line Find your Lisp file in the file browser Click 'Load' Click 'Close' Type the command of your Lisp, it is the word after the "c:" toward the top of the text file Hope that helps! Quote
Lee Mac Posted February 18, 2010 Posted February 18, 2010 General Guide here: http://www.cadtutor.net/forum/showthread.php?t=1390 Quote
phillyphantom Posted February 18, 2010 Author Posted February 18, 2010 ya, that is the tutorial I followed. Maybe the lisp routine that I downloaded has a problem. Everything works up until the point where I type it into the command line. Then I get an unknown command. I attached a picture showing that the lisp was loaded properly Quote
c2designkitchen Posted February 18, 2010 Posted February 18, 2010 Can you post your code as well? Quote
phillyphantom Posted February 18, 2010 Author Posted February 18, 2010 ok, thanks guys for the quick responses. I think I have figured it out. Quote
todouble22 Posted February 18, 2010 Posted February 18, 2010 Try Typing The Command In Parentheses, Maybe The Person Who Created The Lisp Didnt Define It As A Command As In (defun C:flattening() . They Just Wrote (defun Flattening() .. And The Rest Of The Code For The Issuing Commands? Quote
phillyphantom Posted February 18, 2010 Author Posted February 18, 2010 ok, now I have a different problem. Before I was typing in the filename instead of what came after C: I guess I miss read that part, sorry. Here is the code. (defun c:flat (/ total-nabor) (vl-load-com) (if (setq total-nabor (ssget "x" '((410 . "model")))) (progn (setq total-nabor (mapcar 'vlax-ename->vla-object (mapcar 'cadr (ssnamex total-nabor))) ) (foreach i '(1e99 -1e99) (mapcar (function (lambda (x) (vla-move x (vlax-3d-point (list 0 0 0)) (vlax-3d-point (list 0 0 i))) )) total-nabor ))) ) (princ) ) When I type in "flat" I get this error Command: flat ; error: Automation Error. Not allowed for this proxy Quote
c2designkitchen Posted February 18, 2010 Posted February 18, 2010 I don't know hardly anything about scripting, but as far as forum tools, it might be useful to have a look at the [#] (code) button in the 'go advanced' option. Just paste your code in there and the indentations and stuff will come out right. Code sample Quote
Lee Mac Posted February 18, 2010 Posted February 18, 2010 ok, now I have a different problem. Before I was typing in the filename instead of what came after C: I guess I miss read that part, sorry. This looks like the one from the Archive, did you try my upgraded version? Quote
phillyphantom Posted February 18, 2010 Author Posted February 18, 2010 I just tried yours Lee Mac and it worked perfectly, thanks And thanks everyone for all your help. Quote
Lee Mac Posted February 18, 2010 Posted February 18, 2010 I just tried yours Lee Mac and it worked perfectly, thanks And thanks everyone for all your help. You're welcome 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.