pryzmm Posted August 25, 2010 Posted August 25, 2010 hi, we usually draw elevations around the floor plan (world, 90, 180, 270) and im having trouble when i copy a set/s of DIMENSION and paste it in a different UCS position, most of the time the dimensions are upside down and not in the proper reading position. earlier on i came across a lisp that correct this but did not manage to copy the code, can anyone point me there again please,, i have tried the search but could not find it. thanks in advance... Quote
Tharwat Posted August 25, 2010 Posted August 25, 2010 You can depend on the Autocad command dimdisassociate And that would correct the Dimensions locations in your drawing. Good luck Tharwat Quote
pryzmm Posted August 26, 2010 Author Posted August 26, 2010 hi tharwat313, thank you for your reply,, I've tried it but that did not solve the issue,the dimension which is copied from ucs and paste in a different ucs remains upside down and not in the proper position,,any other suggestion? .....anyone Quote
Guest kruuger Posted August 26, 2010 Posted August 26, 2010 (defun C:DR (/ DIM_CNT DIM_SS1 DIM_OBJ DIM_ANG) (command ".undo" "group") (setq DIM_CNT 0 DIM_SS1 (ssget '((0 . "DIMENSION")))) (if DIM_SS1 (progn (repeat (sslength DIM_SS1) (setq DIM_OBJ (entget (ssname DIM_SS1 DIM_CNT))) (setq DIM_ANG (- (cdr (assoc 51 DIM_OBJ)) (DTR 180))) (setq DIM_OBJ (subst (cons 51 DIM_ANG) (assoc 51 DIM_OBJ) DIM_OBJ)) (entmod DIM_OBJ) (princ (strcat "\rRotating dimension " (itoa DIM_CNT) " of " (itoa (sslength DIM_SS1)))) (setq DIM_CNT (1+ DIM_CNT)) ) (princ (strcat "\rRotating dimension " (itoa DIM_CNT) " of " (itoa (sslength DIM_SS1)))) ) ) (command ".undo" "end") (princ) ) maybe this? kruuger Quote
Tharwat Posted August 26, 2010 Posted August 26, 2010 (setq DIM_ANG (- (cdr (assoc 51 DIM_OBJ)) ([color="blue"][b]DTR 180.0[/b][/color]))) maybe this? kruuger You can add the DTR defun if you do not use the PI . (defun DTR (ang) (* pi (/ ang 180.0))) Regards. Quote
Guest kruuger Posted August 26, 2010 Posted August 26, 2010 oops, i missed that DTR. thanks tharwat kruuger Quote
Tharwat Posted August 26, 2010 Posted August 26, 2010 You're welcome kruuger. Best Regards, Tharwat Quote
pryzmm Posted August 26, 2010 Author Posted August 26, 2010 kruuger, thanks i quickly run your lisp using (cad 2009) and this is the error i get;; Select objects: > i think this has something to do with "tharwat" suggestion but idont know where to put the code,, could you pls have a look again,,, thanks Quote
Guest kruuger Posted August 26, 2010 Posted August 26, 2010 put DTR at the of DR (defun C:DR (/ DIM_CN.... (princ) ) (defun DTR (ang) (* pi (/ ang 180.0))) and run once again kruuger Quote
pryzmm Posted August 26, 2010 Author Posted August 26, 2010 wow kruuger,, you nailed it,, but i noticed that if i select all the dimension relative to the ucs location (using window) those that is already in the correct location change its position and vice versa,,but selecting individually works perfect,,, is there a work around that it detect those that is already correct and affect only those that need to....just a thought.... you have done great already,,, thanks again Quote
Guest kruuger Posted August 26, 2010 Posted August 26, 2010 now it will be very hard. too much work. here is trick how to do this without any lisp: 1. make a block from dims which you want to copy 2. paste to other dwg. 3. DO NOT EXPLODE because dims may flip but.. 4. use _REFEDIT command and remove all dims from block (noticed that dims didn't flip ) 5. draw any object in "empty" block and close refeditor 6. delete "empty" (with object which you drawn) block i hope it is clear kruuger Quote
Recommended Posts
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.