Continue to Site

Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

  • Congratulations GregLocock on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

LISP or VB

Status
Not open for further replies.

CTruax

Civil/Environmental
May 21, 2001
82
I am just begining to code a routine in LISP ACAD R14.
I get an error using the midpoint on a line function;
(plt p1,p2,0.5)
Error message is "Invalid dotted pairs".

LISP seems over parenthesized and ilogic (but must work).

I bought VB6 and have programmed for 25 years but ACAD interfacing is new challenge for me.

If you've experienced both, would you suggest VB or LISP interfacing ?
 
Replies continue below

Recommended for you

ctruax,

I wonder if the commas are to be in between
p1, p2, and 0.5.
I have not lisped for awhile but the line
looks strange to me.
I think they should be separated only by a
space which is equivalent to a comma.
 
I have not programmed in LISP for a while. It is quite powerful but somewhat cryptic. VB is easier to read and is more suited for large applications. If you are just going to write a small utility, I would use VBA (inside of AutoCAD) or LISP. If you are writing a larger application, especially with user forms, I would suggest creating an executable in VB. Since you already have that much experience with VB, learning the AutoCAD API will be a breeze.

I just realized that you are working with R14. This was AutoCAD's early attempt to include a VB API. Writing VB programs for R14 is more complex that in 2000 or 2002. It can still be done, but the later releases have the VB feel to them. If you are going to write appplications that are going to be around for a while, I would suggest that you upgrade before writing any programs. Programs for R14 will work in later releases, but you will be learning techniques that are not required in the new version.

I hope this helps a bit! If you need some sample code, you found the right forum. DimensionalSolutions@Core.com
While I welcome e-mail messages, please post all thread activity in these forums for the benefit of all members.
 
Diamond is right - no commas between arguments in Lisp function calls
(foo "catch" 22 31)

dsi is right - VBA is a better investment, especially from Acad2000 onwards.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor