ReMark Posted October 10, 2009 Posted October 10, 2009 While trolling the Internet I came across the following website featuring an article entitled Lofting of Bodies in Conic Structures using AutoCAD, written by sblack and dated May 22nd, 2001. It includes three LISP routines, Conic, Fuseloft and Pick_stn, to assist model designers in the construction of fuselages and other bodies. There are instructions for using the LISP routines, figures keyed to the text, examples of what can be done with the routines and a test drawing named Sabretest.dwg one can use for practice. Check it out at: http://www.rcgroups.com/forums/showthread.php?t=201777 Quote
cuwaert Posted January 6, 2010 Posted January 6, 2010 Hi, I find this a very interesting script however I tried to use it and it returns an error "invalid window specification", in acad2008 that is and in the sample drawing "sabretest.dwg". Maybe some uncompatibility between 2008 and other acad version... well you know how software is. So I presume I'll have to learn how autolisp works to make the necessary change, I suspect the statement (command "ucs" "o" orig) in the function definition of "draw_section". Quote
ReMark Posted January 6, 2010 Author Posted January 6, 2010 Sorry to hear that. Having no interest in airplane design I did not test the routines myself. What makes you suspect the statement you mention above? Quote
Lee Mac Posted January 6, 2010 Posted January 6, 2010 Just taken a quick look at the Fuseloft routine - quite badly written, as the author has used protected symbols as variable names, which is never a good idea... I'll take a look through it and see about posting an updated version. Quote
ReMark Posted January 6, 2010 Author Posted January 6, 2010 Have no fear SuperMac is here. No doubt that if Lee Mac rewrites the code it will be a vast improvement. Quote
Lee Mac Posted January 6, 2010 Posted January 6, 2010 Have no fear SuperMac is here. No doubt that if Lee Mac rewrites the code it will be a vast improvement. Haha... on second thoughts, a proper re-write could take a while... as there is absolutely no error-trapping at all in it either... time that I don't have Quote
cuwaert Posted January 7, 2010 Posted January 7, 2010 Hi, well I don't think the ame was to write a beautiful program but to make it do things wright. Well Remark, that was only a first and totally wrong guess, I opened the script in visual lisp and the problem appeared to be in this routine (defun gety (poly xval) ; gety finds the point of the polyline "poly" that corresponds to the xlocation xval ; by tracing a vertical line indicated by (list xval ypic)from the actual xlocation xval ; intersecting the reference ; line through xval ; Find arbitrary y pickpoint in viewport (setq ypic (cadr (getvar "viewctr"))) ; Draw vertical line of infinite length on xlocation xval (command "XLINE" "VER" (list xval ypic) "") ; Trim line to the polyline poly, this is where it crashes in 2008 (command "TRIM" poly "" (list xval ypic) "") ; Get base point of trimmed line (setq xline (entlast) yval (caddr (assoc 10 (entget xline))) );setq ; Erase line (entdel xline) ; this function returns the yval yval );defun more specificly in the underlined statement. I can't find the syntax of "TRIM" anywhere on the web or I'm just looking over it so for the moment don't know what's wrong with it. (yes made some comments myself) On that line it knocks out of operation leaving a vertical line nicely trimmed at the beginning of fuselage max width polyline and a selection window sticking at the cursor. "Invalid window specification" it says. The variable "length" seems to be a restricted word I found out in Visual Lisp, just running the thing in autocad doesn't seem to bother though.... a bit of a mysterie. 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.