I just purchased ACAD 2014 and am trying to get some really old AutoLISP commands I wrote to work. The old commands I wrote use the "Place" function to insert blocks. Does anyone remember the "Place" function? And what is used now instead? I would really appreciate any help on this.
Thanks,
Richard
Hi,
First, I can't remember a "place" autolisp function, I'm using AutoCAD since v9, and I think it never existed. The way to "place" a block is a call to "insert", note that it's an AutoCAD command, so you need to call it with the command function like. (command "insert" blockname point..etc.).
Gaston Nunez
Gaston,
Thanks so much for writing. I have searched and can't seem to find any reference to the "Place" function either. Here is an example of the code:
(defun C: SQUARE12()
(SETQ LA "E-MISC")
(SETQ OS "")
(SETQ SYM "S12")
(SETQ SC (GETVAR "USERR1"))
(SETQ ROT 0)
(PLACE LA OS SYM SC ROT)
)
This was written for ACAD 2000i. Apparently "Place" inserts a block on the specified layer, with specified object snap, specified scale and specified rotation. Does that ring any bells?
Thanks,
Richard
Hi Richard,
Given the code you have posted, the program is evaluating the 'PLACE' symbol as an AutoLISP function, not an AutoCAD command, hence I would expect the PLACE function to be defined elsewhere in your code, e.g. (defun PLACE ...
Lee Mac,
Thanks! You are correct. It's been so long since I worked with AutoLISP. Now I need to figure out why I am getting an error message for my commands which worked for AutoCAD 2000i. Thanks again. This Discussion Group is great!
You're very welcome Richard, I'm happy to help.
With regards to determining the source of the error in your program, you might find my debugging tutorial useful in this respect; just ask if you have any questions about the tutorial.
All the best,
Lee