Community
AutoCAD Forum
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Changing units

2 REPLIES 2
Reply
Message 1 of 3
Anonymous
357 Views, 2 Replies

Changing units

So here's the case,

 

I set units to milimeters and drew some windows with dimensions. Now I want calculate the area in meters, i go to "units" -> change to meters but when

I use area command the units are in square milimeters. How would one change the displayed dimensions to meters and vice versa?

2 REPLIES 2
Message 2 of 3
Kent1Cooper
in reply to: Anonymous

The area is shown in square drawing units, whatever they are.  If you change the drawing unit to a meter, the number of drawing units of [for example] the length of an edge of a window is still the same -- they just represent a much bigger window now, since the drawing unit is so much bigger.  You would have to change the drawing unit and Scale the window down by 1/1000, so that the window edge is now the correct number of drawing units long in terms of meters.  Then the area would show as the correct number of square meters.

 

If you want to see it as Text for square meters [whether in a (prompt) or an (alert) or actually drawn into the drawing], rather than in the Area slot in the Properties palette, there are routines around that can do that conversion for you, without changing the drawing unit setting -- a little Searching will find several.

Kent Cooper, AIA
Message 3 of 3
Anonymous
in reply to: Anonymous

You can't change the "display" from one unit set to another without customization.  You can alter the returned DIMENSIONS by altering the DIMLFAC in the dimstyle.

 

For area you need some customization that reads the area in mm and converts to meters.

 

You can cut this one up to match your needs, there's two commands

LISTAREAM will popup an alert box with the area in mm and in meters

TAGAREAM will ask you for a text location and will place the areas as a note.

Feel free to rename them as you like.

 

;;;   TagAreaM.LSP
;;;   Copyright (C) 1996, 1998, 2000, 2003  "Falcon Design Services"
;;;
;;;    Permission to reuse, share, post, copy, borrow, steal, 
;;;    or generally do with it whatever you wish is hereby granted.
;;;    Like that would make a lot of difference anyway.
;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(defun CalcAREA () 
  (setq a 0 
        ss 
		(ssget 
		'(
		(-4 . "<OR")
		(0 . "CIRCLE")
		(0 . "region")
		(0 . "3dsolid")
		(0 . "*polyline")
		(0 . "spline")
		(0 . "ellipse")
		(-4 . "OR>")
		)
        )
   ) 
  (if ss 
    (progn 
      (setq n (1- (sslength ss))) 
      (while (>= n 0) 
        (command "_.area" "_o" (ssname ss n)) 
        (setq a (+ a (getvar "area")) 
              n (1- n))
      ) ;;close while
     );;close progn 
    (alert "\nNo Objects with AREA selected!")
) ;;close if
  (princ) 
) ;;close defun
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(defun C:ListAREAM ()
(calcarea)
(if (/= a 0)
(progn
    (alert 
        (strcat "The total area of the selected object(s) is   \n\n     " 
			(strcat 
             "\t " (rtos a 2 2) " Sq Millimeters,\nor\n        " 
             "\t " (rtos (cvunit a "mm^2" "m^2") 2 3) " Sq. Meters,  \n\nor\n\n             " 
			)
        )
	)
)
)
(princ)
)
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(defun C:TAGAREAm ()
(calcarea)
(if (/= a 0)
(progn
(setq str3
        (strcat
			(rtos a 2 2) " Sq Millimeters\\P"
			(rtos (cvunit a "mm^2" "m^2") 2 3) " Sq. Meters\\P" 
         )
)
(setq at2  (getpoint "\nLocation for text... "))
(command "Mtext" at2 "R" "0" "J" "MC" "W" "0" str3 "")
)
)
(princ)
)
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

AutoCAD Inside the Factory


Autodesk Design & Make Report