sm177y Posted May 20 Share Posted May 20 I have this function that copies the rotation angle of one block to another but it does not rotate the text attributes with the block like happens if I were to manually copy and paste the rotation angle from the one blocks properties menu to the other blocks. The attributes stay stuck at their previous rotation and position. How do I make this also affect the attributes so that it effectively does exactly the same thing as copying the rotation angle in the properties menu? For a better description, I have a block that is a square with a text number in the middle of it. When I use this function it only rotates the square which brings the square away from the text and the text no longer resides within the square. If I copy the rotation in the properties menu of each block the text rotates with the square and stays inside of it. ;; copies rotation of one block to another (defun c:cr (/ blk1 blk2 rot1) (setq blk1 (car (entsel "\nSelect block to copy rotation from: "))) (if (not (setq rot1 (cdr (assoc 50 (entget blk1))))) (progn (princ "\nBlock has no rotation angle.") (exit) ) ) (setq blk2 (car (entsel "\nSelect block to apply rotation to: "))) (entmod (subst (cons 50 rot1) (assoc 50 (entget blk2)) (entget blk2))) (princ) ) Quote Link to comment Share on other sites More sharing options...
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.