This is an archive of CompuServe forum messages from 1985 to 1995, as saved in transcripts by John Foust.
Search Results (88 messages)
Rusty, Yes, I'll be arriving in Chicago @5AM Monday, and attending virtually all sessions. Departing Chicago early Friday AM. Staying at Hilton. — Phil Kreiker, Looking Glass Microproducts
Michael, the commands to open the birdview can be included in ACAD.LSP, along with the Artist LISP routines. Are you using AEC? (That would change things.) Also, a script file could be constructed to do what you want. Experiment! =SM=
Dale — Look at the MODES function in the R-SURF.LSP file included with your AutoCAD release disks. It was designed to do exactly what you want. — Brad ..
Bill — Use AutoLISP to build an AutoCAD script file. Unlike an AutoLISP program, a script file can be used to feed input to the AutoCAD File Utility Menu, which can be used to rename existing files. Look up the FILES command in the AutoCAD Reference Manual. I hope this…
Michael — I might redefine the INSERT command, or use a new command similar to the one below: .. (defun C:INST () (command "insert" pause pause pause pause pause) (setq e (entlast)) ) .. or simply run this routine after a block INSERTion: .. (defun C:EL () (setq e (entlast))…
Michael – AutoCAD has a number of built-in "default variables" -such as the last hatch pattern and style, the last text rotation angle, the last system variable referenced by the SETVAR command, and the ending angle for the last line or arc drawn (for continuation) — that are not saved…
#Save/Restore DimVars
Message #22214
Does anyone know of a slick way to store all (or part) of the Drawing Variables(Dim Vars in particular) within a LISP propram? During the course executing my LISP program, I am changing Drawing Variable, in particular, Dimension Variables, such as dimtah,dimtxt,dimtsz, etc. However, after completing the program I would…
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" "")…
#"shell" from autolisp
Message #22197
Good day. My name is Bill Mida from TCBC in Ann Arbor. I'm wondering ho to rename drawing files from within an AutoLisp program. The major problem that I don't know the names of the files I want to rename until I run my pprogram. First, I prompt the user…
Mark — Have you looked at the SPIRAL.LSP file that was included with your AutoCAD Bonus Disk? — Brad ..
Phil, Thanx ! I hyave received three different solutions to the same problem – talk about response ! Dave Maki
THANX – You are right – Brad's is easier – but I like to see how two different people handle the same problem. Dave Maki
I like that – THANX ! Dave Maki
Shape Thanks!
Message #22179
Steve. You spotted it. That space following the comma in the shape file must've been the culprit, cuz it works fine now! Thanks much. Len.
lisp program
Message #22178
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…
AutoLisp
Message #22176
Anyone, In the process of setting up a prototype drawing, we'd also like to to automatically open up the BIRDEYE view of an Artist 10. The card comes with lisp routines to support the card, and we'd like to add a command at the end of the ACAD.LSP file that…
Mystery variable
Message #22175
Anyone, I have a client who does a lot of repetitive work that references the last block inserted into his drawing. We're trying to do some lisp routines to help avoid some of this, but for the life of me I can't figure out how to "default" to the last…
Give Phil the prize for the best (and most efficient) answer! Phil, are you gonna be at ACAD Expo??? Rusty
David, The function you are looking for is (defun minlist (alist) (apply 'min alist) ) My last message omitted a (. Phil
David, Here's what you want: (defun remove (item alist) (if (member item alist) (append (reverse (cdr (member item (reverse alist)))) (cdr (member item alist)) ) alist ) However, why not just insert your list items in sorted order: (defun insert (item alist) (cond ((or (null alist) (< item (car alist)))…
David, The function you are looking for is as follows: (defun minlist (alist) apply 'min alist) ) Phil Kreiker, Looking Glass Microproducts
David – Here's another method involving a recusrive "mymin" function: (defun mymin (a) (cond ((> (length a) 2) (mymin (cons (min (car a) (cadr a)) (cddr a)))) ((= (length a) 2) (min (car a) (cadr a))) (T "Argument must be list of 2 or more numbers") ) ) Assuming you've…
Brad: Thanks for the response; I think you may have hit on something; the 255 character limit is new to me; You know, I have always had a goofy time combining command prompt responses and lisp routines in menu; macros. I think I have always been missing part of the…
David — Try this: .. (setq lst_of_reals (list 1.0 2.0 3.0 4.0 0.5)) .. (setq min_of_lst_of_reals (eval (cons 'min lst))) .. As you can see, we use CONS to place the atom MIN at the front of the list of reals, and then use EVAL to force an explicit evaluation…
LISP AGAIN
Message #22092
This is a follow-up to my previous LISP question regarding the minimum value in a list. I think I can get that value – but now I need to be able to delete that value from the list, any ideas ? – What I am trying to do is to…
#LISP ???
Message #22090
I have a list of reals assigned to s1. How can I find the minimum value in that list s1 ? Example: s1 = (1.2 3.4 5 6.7) Find the Minimum = 1.2 The MIN function will not work on a list – am I missing a clever programming technique…
Len, I tried those shape definitions and both worked fine for me. The second one produced a square half the size of the first. Perhaps there is a typo or some other wierd, non visible character in your .SHP file. Your message does show a space after (0,0): "(0,0), 2,"…
THANKS, BRAD!
Len — Personally, I prefer cash. You know, cold, hard sheckels. Baubles, bangles and beads don't cut it in Training. Give us those old-time negotiable securities and tax-exempt municipal bonds. Just kidding. Generally, I think we all try to acknowledge each other's messages, without going too much into the Alphonse-Gaston…
Craig — I don't know, but here's an example of what can cause the "Can't re-enter AutoLISP" error (kids, don't try this at home): .. Command: (setq pt1 (getpoint "\nPoint: ")) Point: (getpoint) Can't re-enter AutoLISP Invalid point. Try again: .. After the first expression is entered, the GETPOINT function…
Thank you Craig…going to try the monotext idea right away! Tag Grossman
Brad and Steve: thanks for your replies…I figured the control characters out myself after a little further thought. The monotext suggestion is one which I will implement as soon as I logoff! Thanks. Tag Grossman
Encrypt thanks
Message #22033
I don't remember what the product name was, but I would like to, at least, make an inquiry. If you hear of any leads, please yell. Thanks, Jamie, for your response.
#Transient thanks
Message #22032
Thanks for your response, Brad. I just peeked at ACAD's SETUP.LSP, and sure enough, a transient type of program! Now I would like to look up that function you suggested but my transmission of your message must have glitched at the wrong moment. Here's what it looks like … ..…
Brad: Not to butt in, but I had the same thing happen to me the other day when I was trying to do a quick fix to a menu macro. I didn't have the time to think it all out, but this is something like what I was doing. I…
Was the product ENCODE? I have heard of that but haven't seen the package yet. Where did you see the article/ad ? Jamie
Len- I think I saw the same add and I think that program is basically a rip off (either intentional or not) of Autodesk's own Kelvinator. What these programs do is replace the variable names with nonsense names and remove all the carriage returns, spaces, and tabs. What results is…
Stan, ACAD.LSP doesn't exist unless you create a file with that name. You would use this file to store any commonly-used LISP routines that you want to be loaded automatically every time you enter the drawing editor. =SM=
Len — You've called it pretty close. When you LOAD a file, AutoLISP redirects standard input from the keyboard to the file, so for all intents and purposes, LOADing a file works the same as if you had typed in the expressions at the keyboard. Did you know that there…
Stan — We don't supply an ACAD.LSP file with the current release of AutoCAD. The document you refer to is implying that AutoCAD will automatically load and evaluate any expressions found in ACAD.LSP should you want to create a file of this name yourself. This is a very popular practice.…
#ACAD.LSP
Message #21983
THE AUTOLISP MANUAL SAYS YOU CAN USE ACAD.LSP IF IT EXISTS-IT DOESN'T. WHERE CAN I GET IT. THANKS STAN PREW 73417,2162
#Transient Autolisp?
Message #21982
I've been avoiding the defun convention lately in several of my lisp programs. That is, (defun xxxx () ;working code goes here );end defun By avoiding the top and bottom line as the working code is "loaded", I perceive that the function is transient, doing its job and leaving behind…
Shape Sizes?
Message #21981
The following shape definition compiles o.k. But it does not give me the size I need. *133,29,square 2,14,8,(-8,-21),8,(0,21),1,9,(0,-21),(21,0),(0,21),(-21,0),(0,0), 2,8,(27,-21),14,8,(-12,-10),0 So I attempted to divide the vector lengths (3,2,) at the beginning of the definition, then return to original size at end by multiplying by same amount (4,2,), then added 4…
The Lisp File
Message #21980
(setq #b (strcase (strcat (getvar "dwgname") ".doc"))) (if (open #b "r") (princ) (progn ;begin dummy file prep to extract complete dir list (setq #dum (strcase (strcat (getvar "dwgname") ".dwg"))) (setq #a (open #dum "w")) (write-line "null stuff only" #a) (close #a) (setq #dee (strcase (strcat "del " #dum))) ;end prep…
FILE DESCRIPTION?
Message #21979
Under separate message, immediately following this one, "FILDESCR" is a lisp program we've been using for several months with few kinks. One problem, although not fatal, is completely baffling. First let me describe the function of FILDESCR. Its intent is to require a one-line verbal description for every drawing being…
ENCRYPT LISP?
Message #21978
I recently saw an advertisement for a program which is capable of encrypting AUTOLISP files. How reliable is it? Assuming AUTOCAD can understand these programs even after encrypting, can ACAD work with either, the standard kind and the encrypted, and within the same editing session? Is a memory resident program…
Prakash — There's really no difference in using AutoLISP from an AutoCAD menu file and using it at the "Command:" prompt. A space character in a menu file is an explicit carriage return. The "Can't re-enter AutoLISP" error message indicates that the AutoCAD-AutoLISP communication buffer is in use by an…
textin.lsp
Message #21961
Theodor — Craig is correct in pointing out that, if you have used a word processor to edit the SDF file created by the ATTEXT command, then it is quite possible that the word processor has inserted "high ASCII" characters in the file. These characters will appear somewhat bizarre when…
#AutoLISP question
Message #21943
I am using the AutoLISP routines from within the MENUS. I am creating an application which is completely driven by MENUS. However from time to time I get an error saying "Can not reenter AutoLISP". What does this mean ?. Does anyone has experience doing AutoLISP programming in MENU file…
Theo: Sounds like you did some text editing in the document mode (i.e. letter writing format). I know that the temptation is great to do so, since your text lines up nicely, etc. but it won't work. There may be some text editors that let you do all of those…
Page 1 of 2