Jump to content

Recommended Posts

Posted

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... :)

Posted

You can depend on the Autocad command

dimdisassociate

 

And that would correct the Dimensions locations in your drawing.

 

Good luck

 

Tharwat

Posted

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 :oops:

Guest kruuger
Posted

(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

Posted
(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.

Guest kruuger
Posted

oops, i missed that DTR.

 

thanks tharwat

kruuger

Posted

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

 

:)

Guest kruuger
Posted

put DTR at the of DR

(defun C:DR (/ DIM_CN....

 (princ)
)

(defun DTR (ang) (* pi (/ ang 180.0)))

and run once again

kruuger

Posted

:shock: 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..:oops:.. you have done great already,,,

 

thanks again 8)

Guest kruuger
Posted

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

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.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...