Jump to content

Recommended Posts

Posted

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

Posted

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!

Posted

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

lisp.JPG

Posted

ok, thanks guys for the quick responses. I think I have figured it out.

Posted

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?

Posted

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

Posted

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

Posted
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?

Posted

I just tried yours Lee Mac and it worked perfectly, thanks

 

And thanks everyone for all your help.

Posted
I just tried yours Lee Mac and it worked perfectly, thanks

 

And thanks everyone for all your help.

 

You're welcome :)

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.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...