Author Topic: Lisp Autocad move block to specific coordinates  (Read 698 times)

0 Members and 1 Guest are viewing this topic.

JimmyDev

  • Mosquito
  • Posts: 1
Lisp Autocad move block to specific coordinates
« on: July 22, 2022, 05:46:28 AM »
Hello,

I would like to move a specific block to specific coordinates. In the example below I can select te block "CART_LV02" and I'm able to move it 0.5 to the right. But how how can I move it for example at coordinates x=200 and y=300?

(command "MOVE" (ssget "_X" '((0 . "INSERT") (2 . "CART_LV02"))) "" "" '(0.5 0 0))

Many thanks

MatGrebe

  • Mosquito
  • Posts: 16
Re: Lisp Autocad move block to specific coordinates
« Reply #1 on: July 22, 2022, 09:22:35 AM »
Just look at the command prompt when using move. Something like
(command "MOVE" (ssget "_X" '((0 . "INSERT") (2 . "CART_LV02"))) "" "#200,100")
should work.
Mathias

Tharwat

  • Swamp Rat
  • Posts: 710
  • Hypersensitive
Re: Lisp Autocad move block to specific coordinates
« Reply #2 on: July 22, 2022, 12:46:02 PM »
It is a better practice to check if the selection set is valid before feeding it up to any command or a function.  :wink: