Visual LISP, AutoLISP and General Customization
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

AutoLISP "Place" Function

5 REPLIES 5
Reply
Message 1 of 6
Anonymous
314 Views, 5 Replies

AutoLISP "Place" Function

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

5 REPLIES 5
Message 2 of 6
hgasty1001
in reply to: Anonymous

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

 

 

Message 3 of 6
Anonymous
in reply to: hgasty1001

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

Message 4 of 6
Lee_Mac
in reply to: Anonymous

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

Message 5 of 6
Anonymous
in reply to: Lee_Mac

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!

Message 6 of 6
Lee_Mac
in reply to: Anonymous

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

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report

”Boost