Jump to content

Recommended Posts

Posted

I was just following the tutorial and i realised that i could not load the testline lisp. AutoCad states [; error:too many arguments ]? I have tried everythin i could think of to no avail. It would be very helpful if someone could shine some light on this issue.

 

Regards

Kenneth

Posted

Can you post your code, make sure you use code tags.

Posted

Did you follow all of the instructions? What did you type to load it?

Posted

(defun c:testline()
(setq a (getpoint "\nEnter first point :" ))
(setq b (getpoint "\nEnter second point :" ))
(command "Line" a b "")
(princ)
)
(princ)

I think i followed all the instructions to the letter

I used (load "testline") then testline to launch. i'm sure its somethin really simple and obvious???? Gladly consider all feedback! thanks!

Posted

Your code is working! So there is an issue with load/call process.

Where is the "testline.lsp" file located?

If is not in one of AutoCAD's search paths you should append the path to load call - please take care that need to use double back-slash. Substitute your current path in example below:

 

(load "D:\\MyTestAutoLISP\\testline.lsp")

 

To call it just input testline at command prompt since is defined as a command.

Good luck!

 

Regards,

Mircea

Posted
Your code is working! So there is an issue with load/call process.

Where is the "testline.lsp" file located?

If is not in one of AutoCAD's search paths you should append the path to load call - please take care that need to use double back-slash. Substitute your current path in example below:

 

(load "D:\\MyTestAutoLISP\\testline.lsp")

 

To call it just input testline at command prompt since is defined as a command.

Good luck!

 

Regards,

Mircea

 

There's still an error? Says LOAD failed =( I saved the lisp file on the desktop.

Posted

Scratch that, i have suceeded in loading the file, but when i call the program using testline it states that there is stil an error and that there are too many arguments?

Posted

I have succeeded. Created a new file from scratch and it works just fine thanks for all your help!

Posted

Sound good that you finally solved your loading issue. Did you stored in the same file some previous code tests?

 

Regards,

Mircea

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...