Below is a custom button I created to be able to center a block between two points by selecting the block then selecting the two points. In this particular case I want the two points to always be intersections (ceiling grid). I have another button that is always centering between to circles (recessed lights). Is there a way to make this into a lisp or something so that I can simply right click to bring up the command again? This works well for me but sometimes it is annoying to not be able to simply right click to get the command again. The point I am copying the block from could be either an insertion point or a center point. I guess the way I am trying to get it to work is to pick my block on the screen and then select the two points I want it in between and then keep on picking the points to insert it in multiple locations during the same command. The two points would always be either an intersection or a center osnap. C^C^_osmode;4;copy;\;\'cal (int+int)/2;
Steve, The attached will get you started. Load the Lisp, type in CB. Cheers. Bob Shaw (bobscadshop.com)
You can't do it without creating a command. (defun c:copyctr ( / pt1 pt2 pt3 ename) (setvar "osmode" 36) ;set osnap to center and intersect (while (not (setq ename (entsel "\nSelect block to copy: ")))) (setq ename (car ename)) (setq pt1 (cdr (assoc 10 (entget ename))) pt2 (getpoint "\nFirst point: ") pt3 (getpoint "\nSecond point: ") ) (command ".copy" ename "" pt1 (polar pt2 (angle pt2 pt3) (/ (distance pt2 pt3) 2.0))) (princ) ) For your menu pick use ^C^Ccopyctr two points by selecting the block then selecting the two points. In this particular case I want the two points to always be intersections (ceiling grid). I have another button that is always centering between to circles (recessed lights). Is there a way to make this into a lisp or something so that I can simply right click to bring up the command again? This works well for me but sometimes it is annoying to not be able to simply right click to get the command again. The point I am copying the block from could be either an insertion point or a center point. I guess the way I am trying to get it to work is to pick my block on the screen and then select the two points I want it in between and then keep on picking the points to insert it in multiple locations during the same command. The two points would always be either an intersection or a center osnap.