Jump to content

AREA to FIELD


nod684

Recommended Posts

I have this attributed door tag (attached)

 

i wish to have the AREA to be in fields by picking a closed polyline/region/circle/arc/ellipse then the value of the area will be written in the Attribute tag in 1e-06 format with m² as suffix

 

My Block name is ROOMTAG

 

can anyone help me please?

TAG_ROOM.dwg

Link to comment
Share on other sites

  • Replies 24
  • Created
  • Last Reply

Top Posters In This Topic

  • nod684

    10

  • irneb

    8

  • Dadgad

    7

Top Posters In This Topic

Posted Images

I was just playing around with this, and noticed that your TAG is being created in IMPERIAL with units set to INCHES.

Knowing you are in Singapore, and wanting the area displayed in m2, I thought I should let you know.

I will continue with this, let you know if I get it working. :)

tag room dynamic area field.JPG

Link to comment
Share on other sites

I don't know if this will help you at all, or not.

It is not finished, but it might help you.

I seem to recall rkent or eldon (?) maybe talking about the need to use a block placeholder

in a field like this, although when I just tried, I was unable to hit paydirt.

Still if you double click on the AREA text you will see that I have defined the conversion factor from

square inches to square meters, and set the display style, for what it is worth.

Perhaps nothing. :)

 

Autocad rules to live by...

When in doubt, check Lee Mac out.

http://www.lee-mac.com/areafieldtoattribute.html

I can only guess that Lee's lisp will help you out, they usually do.

Thanks Lee! :beer:

TAG_ROOM.dwg

Link to comment
Share on other sites

HI Dadgad, thanks for the reply. My INSUNITS is set to 4. UNITS is also set at millimeters.

Currently what am doing is right-click on the AREA value and select INSERT FIELD. Then from Field Names i select OBJECT. Under OBJECT TYPE i need to select a closed polyline and select AREA under Property.

 

Then click "Additional Format", put 1e-06 to the Conversion Factor and m2 under suffix.

in your tag_room, its almost the same as what am currently doing.

 

i can't think of a way in which if i copy the Tag to, let's say a new room. i can run a LISP and it will ask me to pick a closed object and ask me to pick the tag and then the lisp should put the area on the tag.

Link to comment
Share on other sites

The link I posted seems to do exactly what you are trying to do,

AREA FIELD TO ATTRIBUTE ... sounds like a match made in Heaven.

 

When I run the -DWGUNITS command on my machine, you can see the response

indicates something entirely different (meaning 1 which stands for Inches).

Have you tried running the -DWGUNITS (include the hyphen) command on it yourself?

Link to comment
Share on other sites

what i wish is that the Area Field Value be written into an attrib block that i have :(

 

Not to beat a dead horse, but you have checked, and this one doesn't help you? :)

Lees lisp doesn't work for you.jpg

Link to comment
Share on other sites

yes Dadgad, actually i have that but that shows the Area in FIELD and does not allow you to write the area value to an attribute...

Edited by nod684
Link to comment
Share on other sites

yes Dadgad, actually i have that but that shows the Area in FIELD and does not allow you to white the area value to an attribute...
What? No it actually places the field inside the attribute. You select the boundary object(s) which defines the area, then you pick the attribute you want the value displayed in.

 

If you cannot pick the attribute (i.e. it's hidden) then set AttDisp=ON temporarily to pick it, then set it back to Normal afterwards.

Link to comment
Share on other sites

And actually, mine does the same - though it allows for you to pick which attribute even if it's hidden (pick on something in the block other than an attribute - like a line) and it asks which attribute to use).

DimFields.lsp

Link to comment
Share on other sites

thanks a lot Irneb! working fine...i was clicking on the attribute text and it displays the area as 0.00

thanks for the clarification.

same thing to Dadgad for always trying to help..

cheers guys!

 

 

one more thing Irneb...can the lisp be modified so that the value of the area in the attribute becomes a FIELD and not as text?

so when the area is changed, the value in the area attribute is updated

Link to comment
Share on other sites

one more thing Irneb...can the lisp be modified so that the value of the area in the attribute becomes a FIELD and not as text?

so when the area is changed, the value in the area attribute is updated

That's exactly what it's doing. At least that's what mine is doing.
Command: DIMAREA

Select the text to display the area in (Enter for Settings):
The selected entity is not TEXT, MTEXT, MULTILEADER, ATTRIBUTE or BLOCK with Attributes. Please try again.
Select the text to display the area in (Enter for Settings):
This is a block. Which Attribute do you want to have the area displayed in?
[NAME / AREA]: area
Select all entities to add to the area:
Select objects: 1 found

Select objects:
Select all entities to subtract from the area:
Select objects: 1 found

Select objects:  Loading AEC Detail Base...

3 field(s) found.
3 field(s) updated.
3 field(s) found.
3 field(s) updated.

And that results in this:

capture_12142012_105356.png

 

Edit: Added sample drawing.

Area Test.dwg

Link to comment
Share on other sites

Is it actually only text, or does it only show without the field-background? Is your FieldDisplay system variable set to 1?

 

on my side its actually a TEXT...FieldDisplay is set to 0.

 

off topic...any sysvar (or anything) related to field showing as ####?

on other drawings it shows ok on some it shows ### only

Edited by nod684
Link to comment
Share on other sites

In my experience with other programs that display might be associated with insufficient space to display a value,

as in exceeding allotted number of digits or with invalid data input?

Link to comment
Share on other sites

But wouldn't that simply change the displayed "value" into ####?

 

I really don't understand why nod's version only results in text - but no fields. I know that particular DimArea routine of mine was used extensively in 2008, 9, 10, 11, 12, and now 13. So it's not a version thing (or shouldn't be).

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