TheSwamp
Code Red => AutoLISP (Vanilla / Visual) => Topic started by: Woabow 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?
-
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.
-
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.