Inserting Block using LISP and Specifying Coordinates

Inserting Block using LISP and Specifying Coordinates

charlesc32LT75X
Participant Participant
543 Views
4 Replies
Message 1 of 5

Inserting Block using LISP and Specifying Coordinates

charlesc32LT75X
Participant
Participant

Within Autocad, I'm looking for the code which will insert a block into a drawing using lisp and specifying the coordinates. I don't want to have to select the Blocks location manually. 

 

Any ideas?

 

Thank you in advance,

 

Charles C

0 Likes
Accepted solutions (1)
544 Views
4 Replies
Replies (4)
Message 2 of 5

paullimapa
Mentor
Mentor

assum'g the following:

Name of block = Down

Insert coordinates: 0,0,0

Insert scale = 1

Insert Rotation = 0

(vl-cmdf"_.Insert""Down""0,0,0""1""0")

Paul Li
IT Specialist
@The Office
Apps & Publications | Video Demos
0 Likes
Message 3 of 5

Kent1Cooper
Consultant
Consultant

@paullimapa wrote:

assum'g the following:

...


... and that the Block is defined for uniform scaling.  If not, add another "1" [between the "1" and the "0"] for the Y scale factor.

Kent Cooper, AIA
Message 4 of 5

charlesc32LT75X
Participant
Participant
Accepted solution

The solution, including the extra "1", worked perfectly. Thank you both for your input.

 

Take care.

 

 

Charles

Message 5 of 5

Sea-Haven
Mentor
Mentor

Another sets scale before selecting insert point. Note if block has attributes need to either turn off add values using Attreq or add all values for the matching attributes "" is ok for blank entry.

(command "-insert" blkname "s" 1 pt 0.0)

  

0 Likes