Author Topic: Selecting a block for -refedit  (Read 1897 times)

0 Members and 1 Guest are viewing this topic.

Woabow

  • Newt
  • Posts: 56
Selecting a block for -refedit
« on: January 30, 2013, 12:33:58 PM »
The -refedit command seems to need a point to find the block, instead of a name or selection. I tried to feed it with the insertion point of a block that I have selected, but this only works when the insertion point is on an item in the block.

Just using a point is no option, because I would like to change my UCS according the block with something like (command "UCS" "e").

(setq pt (getpoint "Select Block: "))
(command "-refedit" pt "o" "a" "y")

Anybody an idea how to select a block and do a refedit on it?

CAB

  • Global Moderator
  • Seagull
  • Posts: 10401
Re: Selecting a block for -refedit
« Reply #1 on: January 30, 2013, 03:03:18 PM »
Try this:
(setq pt (entsel "\nSelect Block: "))
(command "-refedit" pt "o" "a" "y")

or you can use this:
(setq pt (entsel "\nSelect Block: "))
(command "-refedit" (cadr pt) "o" "a" "y")

sorry don't know what the "e" option is in UCS.


You may need (trans pt 1 0) or similar.
I've reached the age where the happy hour is a nap. (°¿°)
Windows 10 core i7 4790k 4Ghz 32GB GTX 970
Please support this web site.

Woabow

  • Newt
  • Posts: 56
Re: Selecting a block for -refedit
« Reply #2 on: January 31, 2013, 03:25:29 AM »
Thanks, seems to work, but I have to test how reliable it is in crowded drawings.

The "E" option is the same as "OB". I also work with Bricscad which says "Entity" instead of "Object". Both work in both programs.