Jump to content

Recommended Posts

Posted

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

  • 2 months later...
Posted

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

Posted

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?

Posted

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

Posted

Have no fear SuperMac is here.

 

No doubt that if Lee Mac rewrites the code it will be a vast improvement.

Posted
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 o:)

Posted

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.

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