Anuncios

The Autodesk Community Forums has a new look. Read more about what's changed on the Community Announcements board.

Anonymous
4026 Vistas, 20 Respuestas

Autocad units in millimeters - Show areas in objects in Meters

I'm working with my Units in millimetres, but when I want to see the area of some object like a polyline I want that result in METERS, it's possible to do that ?

 

Thank you

 

Hugo 

imadHabash
en respuesta a: Anonymous

Hi,

 

you can get it by LISP files existing in the web and herewith one that i usual use.

 

mm.png

 

 

(defun drtxt (/ rn tx ls vl lt ht lb hb nr pt)
(setq tx (strcat "Area: "
(rtos (/ (getvar "area") 1000000) 2 2)
" m2"
)
rn (getstring "\nRoom Name: ")
)
(setq ls (list (cons 1 tx))
vl (textbox ls)
vl (cadr vl)
lt (car vl)
ht (cadr vl)
vl (grread T)
nr (car vl)
pt (cadr vl)
)
(princ "\nInsert Point: ")
(while (/= nr 3)
(command "redraw")
(grdraw pt (setq pt (polar pt 0 lt)) 7)
(grdraw pt (setq pt (polar pt (* pi 0.5) ht)) 7)
(grdraw pt (setq pt (polar pt pi lt)) 7)
(grdraw pt (polar pt (* pi 1.5) ht) 7)
(setq vl (grread T)
nr (car vl)
pt (cadr vl)
)
) ;end while function
(command "-mtext" pt "w" 0 rn tx "")
(redraw)
) ; end drtxt function

(defun c:pla ()
(setvar "cmdecho" 0)
(while (setq et
(car
(entsel "\nSelect polyline: ")
) ;end car function
) ;end setq function
(command "area" "o" et)
(drtxt)
) ; wnd while funtion

(setvar "cmdecho" 1)
(princ)

) ; end c:pla function

--------------------
(if (eq (getvar 'savetime) 0) (setvar 'savetime 7))

Imad Habash

EESignature

Anonymous
en respuesta a: imadHabash

how can I load this rotine to be permanent and what command do I use to work with that ?

 

 

imadHabash
en respuesta a: Anonymous

put the data in a .txt file then rename the extension to lsp then from AutoCAD type APPLOAD command.

then type PLA  

 

de.png

 

 

Note:

if do you want this lisp to be always there... put the file some where in folder then from APPLOAD command go to the briefcase  to always be there.

 

Good Luck..

Imad Habash

EESignature

Anonymous
en respuesta a: imadHabash

I did it, it works very well, but when I closed my AutoCAD and open again, it's not there, I have to load again,

 

there is any way to be permanent ?

 

Thank you

Patchy
en respuesta a: Anonymous

Use APPLOAD, and find an icon looks like a suitcase, click it and add your autolisp in there.

imadHabash
en respuesta a: Anonymous

Hi,

 

as i told you in previously add the file to the briefcase from AP command.

 

Untitled picture.png

Imad Habash

EESignature

Anonymous
en respuesta a: imadHabash

this way I already did it :cara_con_una_leve_sonrisa:

 

Everything it's working

 

Thank you

 

Hugo

imadHabash
en respuesta a: Anonymous

You're Welcome.. :cara_con_una_leve_sonrisa:

Imad Habash

EESignature

Anonymous
en respuesta a: imadHabash

another one to complete this work :cara_con_una_leve_sonrisa: it's possible to link this Area to a Polyline in the way that if we change the polyline this area will be automatic update ?

 

Thank you 

imadHabash
en respuesta a: Anonymous

Yes... you can by FIELD command or use another lisp routine like >> Link >> 

i hope it's help

Imad Habash

EESignature

Anonymous
en respuesta a: imadHabash

I know the FIELD command and I use, but it take some time because I work with the units in millimetres and want the areas in Meters, that's why my question because this lsp to put names and areas it's great :cara_con_una_leve_sonrisa:

pendean
en respuesta a: Anonymous

FIELD command, OBJECT selection, Conversion Factor...

 

Capture.PNG

 

 

There is also a freeware on the Autodesk Exchange site called AREA OBJECT LINK that may be a good alternate as well.

Patchy
en respuesta a: pendean

1m sq. = 1,000,000 mm2

 

Dean missed it

sthompson1021
en respuesta a: Patchy

Must be new math your usingEmoticono muy feliz I was always taught that 100x100=10,000Guiño

Patchy
en respuesta a: sthompson1021

Must be new math your usingSmiley Very Happy I was always taught that 100x100=10,000Smiley Wink

 

 

Really m, dm, cm,mm

 

a meter is how many mm Mr. Thompson????  Then square it

 

You guys confused me.

sthompson1021
en respuesta a: Patchy

Emoticono avergonzadoOK, can I tuck my tail between my legs and run away now. I'll stick to my feet and inches.

pendean
en respuesta a: Patchy

LOL, either way, the feature wanted is available in FIELD for the OP.
Patchy
en respuesta a: pendean

Field needs some improvements, it's too slow because going thru several clicks to get Field.

There are a bunch of add-on but I haven't found one that can do a conversion like that, I know Customization group can whip it up in a few minutes.

pendean
en respuesta a: Patchy

FIELD is slow if you use it OOTB and need to use it 20+ times in a day, every day, all week long: there are many tips around these forums to edit the windows registry to pre-set many of the default options that do not work, as well as excellent Diesel macros to help automate other tasks.

Plus one or two freeware on the Autodesk Exchange site and for-purchase from third party providers.

Honestly, it's up to the OP's comfort level to pick the solution that helps them get the task done. All we can do is present options without shooting down others ideas.

 

*EDIT*: hope it doesn't read as an attack Patchy, not meant to be. No emotions in my writings as you know.

 

*UPDATE* the free add-on I talked about from the Autodesk Exchange website

Capture.PNG