Jump to content

Conversion factor and suffix


rengised

Recommended Posts

Hi there guys. Need help here. I have almost two thousands of attributes with area (field). the current conversion factor is in 0.00001 something and the current suffix is ha. i spend almost six hours to edit all those attribute. I need to edit one one by one all of them. I have more areas to edit on other phases of the project.Is there a way or technique or maybe a lisp to edit those field? TIA

Link to comment
Share on other sites

It sounds like your units are meters, and your area measurements are being displayed in hectars.

What units do you want your area displayed in?

Link to comment
Share on other sites

Hi all, please see attached cad file. this is only some part of the project. The units is in meter.

You can see in the drawing that the above areas are in hectare, while in the below which i edited one by one is in sq.m.

Thanks.

PLOT.dwg

Link to comment
Share on other sites

I finally figured out how to do this, with Lee's http://www.lee-mac.com/areafieldtoattribute.html

 

Because the Area field is nested inside an attribute, everything else I tried failed.

This works, it is not quite one click magic, but I am sure it will save you plenty of time.

 

You will need to download the lisp, to an appropriate location on your computer.

Then open it, with NOTEPAD.

Replace the field format description up at the top of the lisp, with the following "%lu2%ps[, sq.m.]" after you have done that SAVE the lisp, and it will now be setup for this exercise.

LOAD the lisp into the drawing.

Type a2a at the commandline to start the lisp.

Select one of the closed polylines defining a space, then follow the commandline prompts, which will instruct you to select one of the ATTRIBUTES, make sure you click on AREA1, as it will change whichever of the 3 available attributes you DO pick.

SMILE broadly, send good energy to Lee, hit your Spacebar, then select the next border, attribute, ad nauseum.

Come to think of it, the way you were doing it was AD NAUSEUM, doing it this way it will be fun, you will fly right through them.

 

As usual LeeMac, to the rescue!

 

Thanks Lee! :beer:

 

I just noticed that in all of the fields which you have already done, the AREAs end with .0 , which got me to thinking that you might want to change the precision of that sq.m. measurement, to lose the decimal place? If so, use this "%lu2%pr0%ps[, sq.m.]" instead, when defining the field format up at the top of the lisp, and it will adjust the precision to 0 (no decimal places). :|

 

Or if you would like to you could do something like this "%lu2%ps[, m²]" so that your area units would be displayed as m², instead of sq.m.

 

Command: a2a

 

Select objects: 1 found

 

Select objects:

 

Select Attribute: _.updatefield

Select objects: 1 found

 

Select objects:

1 field(s) found.

1 field(s) updated.

Command: A2A

 

Select objects: 1 found

 

Select objects:

 

Select Attribute: _.updatefield

Select objects: 1 found

 

Select objects:

1 field(s) found.

1 field(s) updated.

Command: A2A

 

Select objects: 1 found

 

Select objects:

 

Select Attribute: _.updatefield

Select objects: 1 found

 

Select objects:

1 field(s) found.

1 field(s) updated.

Command: *Cancel*

 

 

If somebody knows a good way to further automate this task, please feel free to jump in, as while this way is much faster than clicking into all those fields individually and defining the formatting, it is still a bit labor intensive. I tried using an ACTION RECORDER MACRO, but it seemed like more trouble than it was worth. :)

Edited by Dadgad
Link to comment
Share on other sites

Hi Dadgad, lisp it works. eventhough you cannot select all it still faster than manually editing them. thanks a lot and to Leemac. Cheers:)

Link to comment
Share on other sites

  • 3 weeks later...

Hi All,

 

How to change the conversion factor from mm to m - I draw in mm and need the area to be expressed in m2

 

Thank you

G_T_M

Link to comment
Share on other sites

Welcome to CADTutor. :)

 

The conversion factor would be .000001 to convert your area expressed as square millimeters into m2, because 1,000mm x 1,000mm = 1,000,000mm2 = 1 m2.

Link to comment
Share on other sites

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