AutoCAD 2007/2008/2009

AutoCAD 2007/2008/2009

Reply
Member
richardw66
Posts: 3
Registered: ‎02-07-2008
Message 1 of 9 (732 Views)

UPSIDE DOWN DIMENSION TEXT

732 Views, 8 Replies
02-07-2008 03:59 AM
Is is possible to get to the bottom of how and why the phenomenon of UPSIDE DOWN DIMENSION TEXT occurs?

You can check back over all the previous versions of AutoCad and in is an ever re-occurring subject in the forums yet the problem never gets answered. I cannot believe that someone within the AutoDesk organisation doesn't monitor this forum and issue the 'Be All and End All' of the subject.

I have been using AutoCAD since 1982 still don't know the answer. Back then it was Version 1.2 and consisted of a 5.25" floppy disk in drive A and another in drive B to draw on!

The problem is this:

When you draw a dimension it takes on the characteristics of the UCS that was current when the dimension was created. If after placing the dimension the UCS is changed, depending in which rotation, the text can appear as being 'upside down'. Now I've tried at lengths in the past to get to the bottom as how and why but have always come to the conclusion that it was a pain in the ass and having failed to find an easy answer the best way to correct it was to delete the offending dimensions and redraw them again.

However, I now have a project where an electronic topographic survey has been carried out and it has been decided to adopt the Origin Point of that survey. Adjusting the origin and having to also rotate the CAD models sightly has resulted in all the dimension text being upside down. It's not just a case of being upside down, it also clashes with other items as naturally when you're placing the original dimension you do so the position the text in the best place also.

I have 20 CAD Models containing literally 1000's of dimension and I can't possibly redraw them all, I'm sure there are plenty of people out there who know exactly where I'm coming from so what is the answer.

Please only reply if you know the answer, not if you think you know.... I've been there, done that and bought the tee shirt and I still don't know!
Mentor
phanaem
Posts: 153
Registered: ‎02-06-2007
Message 2 of 9 (732 Views)

Re: UPSIDE DOWN DIMENSION TEXT

02-07-2008 04:50 AM in reply to: richardw66
change flag 51 to 0 may solve your problem.
if you plot from different ucs, not wcs, than change flag 51 to UCSXDIR value
Mentor
phanaem
Posts: 153
Registered: ‎02-06-2007
Message 3 of 9 (732 Views)

Re: UPSIDE DOWN DIMENSION TEXT

02-07-2008 04:55 AM in reply to: richardw66
oops.. for a custom UCS the correct value is (angle '(0 0) (getvar "UCSXDIR"))
Member
richardw66
Posts: 3
Registered: ‎02-07-2008
Message 4 of 9 (732 Views)

Re: UPSIDE DOWN DIMENSION TEXT

02-07-2008 05:20 AM in reply to: richardw66
I must confess that I have absolutely no idea what you are on about!

In simple terms, the text on the dimensions drawn in a previous UCS are displayed upside down. If I now draw new dimensions the current UCS the text appears the right way up. You'd think that by using the DIM - UP - ALL command or at least matching the old dimensions with the a new one the text would be corrected but No, matching only matches the dimstyle.

(In a way similar to hatch angle that is also relative to the UCS it was placed in, but then using the MATCH command changes it to match the Current UCS.)

The dimsyle say's the text should be the right way up but because they were drawn in a previous UCS, (the orientation of which has been changed), they are relative to the direction of that previous UCS.

Interestingly, the previous UCS was parallel with the Front Wall of the building as is the new Current UCS, but the building has moved a mile or so and rotated very slightly in the WCS so that it matches the Origin Point of the local grid on a topographic survey.

Why is the dim text related to the UCS it was created in and is there a Variable that controls this that can simply be switched to match the current UCS?
*Joe Burke
Message 5 of 9 (732 Views)

Re: UPSIDE DOWN DIMENSION TEXT

02-07-2008 05:44 AM in reply to: richardw66
Here's a LISP routine which should help.

Joe Burke

[code]
(defun c:FixDimensions ( / idx cnt twist ss obj txtpos)
(setq idx 0
cnt 0
twist (getvar "VIEWTWIST")
)
(if (setq ss (ssget
(list '(0 . "DIMENSION") (cons 410 (getvar "ctab")))))
(repeat (sslength ss)
(setq obj (vlax-ename->vla-object (ssname ss idx))
txtpos (vlax-get obj 'TextPosition)
)
(vlax-put obj 'Rotation twist)
(if (not (equal txtpos (vlax-get obj 'TextPosition) 1e-2))
(setq cnt (1+ cnt))
)
(setq idx (1+ idx))
)
)
(princ (strcat "\nNumber of dimensions modified: " (itoa cnt)))
(princ)
) ;end

;shortcut
(defun c:FD () (c:FixDimensions))
[/code]


wrote in message news:5841415@discussion.autodesk.com...
Is is possible to get to the bottom of how and why the phenomenon of UPSIDE DOWN
DIMENSION TEXT occurs?

You can check back over all the previous versions of AutoCad and in is an ever
re-occurring subject in the forums yet the problem never gets answered. I cannot
believe that someone within the AutoDesk organisation doesn't monitor this forum and
issue the 'Be All and End All' of the subject.

I have been using AutoCAD since 1982 still don't know the answer. Back then it was
Version 1.2 and consisted of a 5.25" floppy disk in drive A and another in drive B to
draw on!

The problem is this:

When you draw a dimension it takes on the characteristics of the UCS that was current
when the dimension was created. If after placing the dimension the UCS is changed,
depending in which rotation, the text can appear as being 'upside down'. Now I've
tried at lengths in the past to get to the bottom as how and why but have always come
to the conclusion that it was a pain in the ass and having failed to find an easy
answer the best way to correct it was to delete the offending dimensions and redraw
them again.

However, I now have a project where an electronic topographic survey has been carried
out and it has been decided to adopt the Origin Point of that survey. Adjusting the
origin and having to also rotate the CAD models sightly has resulted in all the
dimension text being upside down. It's not just a case of being upside down, it also
clashes with other items as naturally when you're placing the original dimension you
do so the position the text in the best place also.

I have 20 CAD Models containing literally 1000's of dimension and I can't possibly
redraw them all, I'm sure there are plenty of people out there who know exactly where
I'm coming from so what is the answer.

Please only reply if you know the answer, not if you think you know.... I've been
there, done that and bought the tee shirt and I still don't know!
Mentor
phanaem
Posts: 153
Registered: ‎02-06-2007
Message 6 of 9 (732 Views)

Re: UPSIDE DOWN DIMENSION TEXT

02-07-2008 05:51 AM in reply to: richardw66
All dimension types have an optional 51 group code, which indicates the horizontal direction for the dimension entity. The dimension entity determines the orientation of dimension text and lines for horizontal, vertical, and rotated linear dimensions

This group value is the negative of the angle between the OCS X axis and the UCS X axis. It is always in the XY plane of the OCS

^^^^^ this is from autocad help...^^^^^
the reason of not align dims with the new UCS is that no other object created in a preview UCS is realigned when changing ucs. they appear upside-down becouse you created so, and that is what you wanted. (at least, autocad think you want so) if you want to realign dims with current UCS try this lisp

(defun C:smileyvery-happy:IMFIX ( / ss i enti)
(setq ss (ssget '((0 . "DIMENSION"))))
(setq i -1 ang (- (* 2 pi) (angle '(0 0) (getvar "UCSXDIR"))))
(repeat (sslength ss)
(setq enti (vlax-ename->vla-object (ssname ss (setq i (+ 1 i)))))
(vla-put-rotation enti ang)
)
)


escuse my englesh
Member
richardw66
Posts: 3
Registered: ‎02-07-2008
Message 7 of 9 (732 Views)

Re: UPSIDE DOWN DIMENSION TEXT

02-07-2008 05:56 AM in reply to: richardw66
CONGRATULATIONS!!!

Everybody take note of this and save this Lisp Routine and add it to your Start-up Box in APPLOAD

It can definately confirm that it works and cures the problem of upside down dimension text once and for all.

Well done that man!
*Joe Burke
Message 8 of 9 (732 Views)

Re: UPSIDE DOWN DIMENSION TEXT

02-07-2008 06:21 AM in reply to: richardw66
You're welcome.

The code should include a call to (vl-load-com) for those who might not call it
elsewhere, as below.

Joe Burke

[code]
(defun c:FixDimensions ( / idx cnt twist ss obj txtpos)
(vl-load-com) ; added
(setq idx 0
cnt 0
twist (getvar "VIEWTWIST")
)
(if (setq ss (ssget
(list '(0 . "DIMENSION") (cons 410 (getvar "ctab")))))
(repeat (sslength ss)
(setq obj (vlax-ename->vla-object (ssname ss idx))
txtpos (vlax-get obj 'TextPosition)
)
(vlax-put obj 'Rotation twist)
(if (not (equal txtpos (vlax-get obj 'TextPosition) 1e-2))
(setq cnt (1+ cnt))
)
(setq idx (1+ idx))
)
)
(princ (strcat "\nNumber of dimensions modified: " (itoa cnt)))
(princ)
) ;end

;shortcut
(defun c:FD () (c:FixDimensions))
[/code]


wrote in message news:5841531@discussion.autodesk.com...
CONGRATULATIONS!!!

Everybody take note of this and save this Lisp Routine and add it to your Start-up
Box in APPLOAD

It can definately confirm that it works and cures the problem of upside down
dimension text once and for all.

Well done that man!
*ddpcad
Message 9 of 9 (732 Views)

Re: UPSIDE DOWN DIMENSION TEXT

02-07-2008 01:19 PM in reply to: richardw66
richardw66 wrote:
> CONGRATULATIONS!!!
>
> Everybody take note of this and save this Lisp Routine and add it to your Start-up Box in APPLOAD
>
> It can definately confirm that it works and cures the problem of upside down dimension text once and for all.
>
> Well done that man!


here's a shorter one that should also do what you want (??)

;;by David Kozina
;;via email 11-20-00
(defun C:FT (/ ss i ent ele)
(setq ss (ssget '((0 . "DIMENSION")))
i (1- (sslength ss)))
(while (not (minusp i))
(setq ent (ssname ss i)
ele (entget ent))
(entmod
(subst (cons 51 (- (abs (cdr (assoc 51 ele))) PI))
(assoc 51 ele)
ele))
(entupd ent)
(setq i (1- i))))
Post to the Community

Have questions about Autodesk products? Ask the community.

New Post
Announcements
Do you have 60 seconds to spare? The Autodesk Community Team is revamping our site ranking system and we want your feedback! Please click here to launch the 5 question survey. As always your input is greatly appreciated.