"Unknown command" when running script

"Unknown command" when running script

Anonymous
Not applicable
3,645 Views
5 Replies
Message 1 of 6

"Unknown command" when running script

Anonymous
Not applicable

Hi everyone,

 

Apologies if this is trivial but I've been having an issue when trying to run a .scr file in AutoCAD. In order to draw an accurate quadratic curve, I have created a table of data points with a column C of ',' between x and y columns A and B respectively as suggested by the Autodesk site. x values range from 0 to 5 in increments of 0.1 and y values are simply x^2. I saved the file as .txt then converted to .scr but when running the SCRIPT command on CAD and selecting this .scr file, an error appears stating 'Unknown command "0"' which may be in reference to the first x value (which is also the first piece of data in the script). I followed the instructions provided by "Draw polylines defined by equations" from Autodesk Knowledge but something must be wrong/missing here surely? I've attached the .txt file if you wish to have a look.

 

Would appreciate any help on this matter greatly!

 

P.S. I'm planning on revolving this curve by 360 degrees to create a 3D bowl-like structure in case any method  for solving the problem above would be better suited for my next steps.

 

Thanks!

0 Likes
Accepted solutions (2)
3,646 Views
5 Replies
Replies (5)
Message 2 of 6

john.vellek
Alumni
Alumni
Accepted solution

Hi @Anonymous,

 

Pleasee try my version of your file to see if it helps.

 

This is what I get when I run it:

Capture.PNG

Please select the Accept as Solution button if my post solves your issue or answers your question.


John Vellek


Join the Autodesk Customer Council - Interact with developers, provide feedback on current and future software releases, and beta test the latest software!

Autodesk Knowledge Network | Autodesk Account | Product Feedback
Message 3 of 6

Anonymous
Not applicable

Thanks for the speedy response John, the 'Pline' did the trick!

0 Likes
Message 4 of 6

Kent1Cooper
Consultant
Consultant
Accepted solution

You don't need to generate that series of points yourself as an external file if you don't want to.  You can use PolynomialFunction.lsp, available >>here<<, to draw the curve for you directly inside AutoCAD.  See the description there and comments in the file.

Kent Cooper, AIA
Message 5 of 6

Anonymous
Not applicable

Hi @Kent1Cooper,

 

Wow, thanks for this. I've never used the LISP functionality before but this was really straightforward and actually a god-send for what I'm currently working on (and you must have put a lot of work into that code) so much appreciated!

0 Likes
Message 6 of 6

Kent1Cooper
Consultant
Consultant

@Anonymous wrote:

.... 

Wow, thanks for this. I've never used the LISP functionality before but this was really straightforward and actually a god-send for what I'm currently working on (and you must have put a lot of work into that code) so much appreciated!


You're welcome!  It's good to know people are still finding a use for it.

Kent Cooper, AIA
0 Likes