Jump to content
resullins

Attribute/Field Precision

Recommended Posts

resullins

I have a block with a field as an attribute that's multiplying two other attributes. It always multiplies to a whole number, but the precision is set to two decimal places. I can not seem to find out how to fix this. It's staring right at me in the Field Expression, but as far as I know, this isn't editable. Any help? 

 

image.thumb.png.a416d41864d6aac21d34e8635fc86433.png

Share this post


Link to post
Share on other sites
BIGAL

Can not see the atts are they a integer no decimals may explain ?

 

Post a dwg.

Share this post


Link to post
Share on other sites
steven-g

As far as I know fields use the system precision 'units'. But what are the properties you have used for the fields in the formula, I would expect to see a number there for the value and not the Tag of an attribute (ie. the field property should be 'value'). Can you post a copy of the block? or show us the field  dialogue for one of the fields from the formula. There are no details showing inside the 'Format' section you should be able to choose between decimal, architectural, etc. and be able to set the precision from there independantly.

Share this post


Link to post
Share on other sites
Dadgad
Posted (edited)
1 hour ago, steven-g said:

As far as I know fields use the system precision 'units'. But what are the properties you have used for the fields in the formula, I would expect to see a number there for the value and not the Tag of an attribute (ie. the field property should be 'value'). Can you post a copy of the block? or show us the field  dialogue for one of the fields from the formula. There are no details showing inside the 'Format' section you should be able to choose between decimal, architectural, etc. and be able to set the precision from there independantly.

 

That sounds about right, like you would be able to, if it were a cell in a Table.

 

image.thumb.png.01dba7111ba7218c6c206e348659b5b7.png

Edited by Dadgad
graphic

Share this post


Link to post
Share on other sites
resullins

Here's the block file. 

 

@steven-g There are no values because it's multiplying two other fields, which are defined from other attributes. And I tried updated the UNIT precision, nothing. 

 

@Dadgad That's what everyone keeps pointing to, the properties. But because I have to open the attribute editor first, there's no way to get to the properties by the time I select the field, if that makes sense. 

 

 

 

_PM SPEAKER-BLOCK.dwg

Share this post


Link to post
Share on other sites
steven-g

It's been a long time since I did anything with blocks, and trying to remember all the ins and outs.

To get an attribute field formula to read other attributes does require a trick and some rules

1) the 'total' attribute has to have the property 'preset' =yes so that it doesn't prompt for a value on insertion and overwrite the field

2) when inserting the fields the tickbox in the attribute editor for 'use block value' has to be ticked

3) and this is the trick - the block has to have a dynamic action carried out once inserted to make it an annonymous block so that the formula will read the values in that block rather than from the block definition, the easiest way is to use a visibility state and hide the total attribute for the state that is used on insert.

In your block you already have a visibility state with 'OFF' being the default so the total attribute needs to be hiden for that state but visible to all the others, I just added a new visibility state 'Total' 

When you first insert the block fill in your values then change the visibility state to one of the other values and do a regen so that the fields can update.

As for the precision once you have added the 'two fields in the formula press the 'evaluate' button and you should then get the chance to select decimal and adjust the precision.

_PM SPEAKER-BLOCK.dwg

  • Like 1

Share this post


Link to post
Share on other sites
Dadgad

@steven-g  Damn, I had just seen this and was eager to download the block and play around with it, certainly sounds like

you've got a real good handle on the situation!  I have had good luck setting up some pretty tricky AutoCAD tables, back in the day,

before we switched to ProSteel, which does that sort of stuff in the background, but no experience with something like this.  Well done!   :beer:

Share this post


Link to post
Share on other sites
steven-g

@Dadgad Thanks, it's been about 4 years since I did anything serious with blocks, the last company I worked for we only did takeoffs from drawings so there was no need to 'create' any content which makes you a bit rusty. I just hope it helps @resullins problem.

Share this post


Link to post
Share on other sites
resullins

@steven-g

 

1. I'll change the PRESET property for that attribute. We just don't tend to overwrite it. We're a small firm with few engineers... but that will be helpful, thanks. 

2. I'm not sure what this is or what it will do? I don't even know where to find this tick box?

3. We always just REGEN when we're all done. Quickest way to get everything to re-read. And What does the TOTAL VS do? We already have OFF where the total attribute is hidden, and it's visible in all the other VS... so I'm confused on this one? 

 

The EVALUATE button doesn't change anything. 

Share this post


Link to post
Share on other sites
steven-g

2. 

2.jpg.3b49e6366ee83cdaa8194743714fcee3.jpg

3. The total visibility state is only there because I didn't know wether you always switch to a visibility state once the block is inserted, and 'total' just keeps the same visual settings as 'OFF' but the important point is you MUST make a dynamic alteration to the block once inserted before the 'total' attribute will work, if you always select a different visibility state then ther is indeed no need for 'total'

Share this post


Link to post
Share on other sites
resullins

That box is definitely ticked. 

 

And thanks for the visual... I haven't had enough coffee this morning, so that helped. 

Share this post


Link to post
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
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

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