Anuncios

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

Autocad units in millimeters - Show areas in objects in Meters

Anonymous

Autocad units in millimeters - Show areas in objects in Meters

Anonymous
No aplicable

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 

0 Me gusta
Responder
4.020 Vistas
20 Respuestas
Respuestas (20)

imadHabash
Mentor
Mentor

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

0 Me gusta

Anonymous
No aplicable

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

 

 

0 Me gusta

imadHabash
Mentor
Mentor

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

0 Me gusta

Anonymous
No aplicable

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

0 Me gusta

Patchy
Mentor
Mentor

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

0 Me gusta

imadHabash
Mentor
Mentor

Hi,

 

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

 

Untitled picture.png

Imad Habash

EESignature

0 Me gusta

Anonymous
No aplicable

this way I already did it :cara_con_una_leve_sonrisa:

 

Everything it's working

 

Thank you

 

Hugo

0 Me gusta

imadHabash
Mentor
Mentor

You're Welcome.. :cara_con_una_leve_sonrisa:

Imad Habash

EESignature

0 Me gusta

Anonymous
No aplicable

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 

0 Me gusta

imadHabash
Mentor
Mentor

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

i hope it's help

Imad Habash

EESignature

0 Me gusta

Anonymous
No aplicable

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:

0 Me gusta

pendean
Community Legend
Community Legend

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.

0 Me gusta

Patchy
Mentor
Mentor

1m sq. = 1,000,000 mm2

 

Dean missed it

0 Me gusta

sthompson1021
Advisor
Advisor

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

0 Me gusta

Patchy
Mentor
Mentor

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.

0 Me gusta

sthompson1021
Advisor
Advisor

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

0 Me gusta

pendean
Community Legend
Community Legend
LOL, either way, the feature wanted is available in FIELD for the OP.
0 Me gusta

Patchy
Mentor
Mentor

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.

0 Me gusta

pendean
Community Legend
Community Legend

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

0 Me gusta