CompuServe Thread

lisp program

3 messages in this thread
#22178From: mark steeleApr 24, 1988 10:46 PM
I have just recently started to write a few small autolisp programs and have run into a small problem. I want to define a routine that will draw spirals. By drawing a square spiral using a pline, then doing a fit-curve on it, a reasonably well defined spiral can be constructed. I want to be able to prompt the user for the number of turns, width of lines and spacing, etc.. However the problem occurs when I try to have the program calculate each segment of the pline's length and direction and then draw it on the screen. If I use the 'while' command, only the last segment is returned, all others are ignored. I tried using an if-then loop but when the variable used for counting the # of turns is incremented, it is returned in response to the pline<endpoint> prompt. There is probably a simple way around this problem, however my inexperience has somewhat hampered my efforts. Any help would be appreciated.
#22192From: Training [ADESK]Apr 25, 1988 11:33 AM
Mark — Have you looked at the SPIRAL.LSP file that was included with your AutoCAD Bonus Disk? — Brad ..
#22199From: Jamie Clay [Adesk]Apr 25, 1988 3:35 PM
Mark, you should not have to look any further than your bonus disk. SPIRAL.LSP came on that disk and we began shipping the bonus disk with the product as of Release 9. The only thing you need to add to it is a simple – (command "pedit" "l" "f" "") and you will have all you asked for. Jamie