Dynamic Block - Inserting field - Length formatted to decimal feet and rounded to nearest half foot

Dynamic Block - Inserting field - Length formatted to decimal feet and rounded to nearest half foot

sarahC6DTR
Enthusiast Enthusiast
1,004 Views
4 Replies
Message 1 of 5

Dynamic Block - Inserting field - Length formatted to decimal feet and rounded to nearest half foot

sarahC6DTR
Enthusiast
Enthusiast

I am trying to insert a length field (from my linear parameter) in my dynamic block which calls out the length of my shearwall as I stretch it (or put a value to it via attribute).

 

My issue is that I am unable to figure out how to insert the field in the format I need: decimal feet and rounded to nearest half foot.

 

I have also tried making a new dimstyle setting for this format, however when I selected the object length of this dimension as the field, it did not acknowledge the formatting I had set up in dimstyle and gave me the same menu for any measurement.

 

For example: 1'-7" as (1.5')

 

0 Likes
Accepted solutions (2)
1,005 Views
4 Replies
Replies (4)
Message 2 of 5

h_s_walker
Mentor
Mentor
Accepted solution

Have a look at the attached drawing. The left part will give the correct length after a regen, whilst the right rounds to the nearest 0.5

Howard Walker
Did you find this post helpful? Feel free to Like this post.
Did your question get successfully answered? Then click on the ACCEPT SOLUTION button.

EESignature


Left Handed and Proud

Message 3 of 5

sarahC6DTR
Enthusiast
Enthusiast

You got me closer to where I needed to be. 

 

I have a couple questions on this method

 

1. I tried this method with attribute field and was able to get results despite being an annotative block, however i can't figure out how to truncate the zeros to just 2 decimal places.

1.1 Obviously, con to this would be the fact that you can edit this attribute once inserted.

 

2.  Does this work as for annotative dyanmic blocks?

2.1 I ask because I used the text field to achieve this, and while I can get results, it only works when the block is not annotative. Is there a workaround as I would prefer this method as this keeps the length protected and unable to be overwritten.

 

(NUMERICAL VALUE ON TOP IS REFERRING TO NOTE 1, VALUE BELOW IS FOR NOTE 2)

 

sarahC6DTR_0-1694223264307.png

 

0 Likes
Message 4 of 5

h_s_walker
Mentor
Mentor

@sarahC6DTR Make the text in the block annotative and add all the scales you need to use to the text. Don't make the block annotative.

As to the decimal places. See the image below

hwalker_0-1694426338250.png

 

Howard Walker
Did you find this post helpful? Feel free to Like this post.
Did your question get successfully answered? Then click on the ACCEPT SOLUTION button.

EESignature


Left Handed and Proud

0 Likes
Message 5 of 5

sarahC6DTR
Enthusiast
Enthusiast
Accepted solution

Unfortunately I cannot make the block not annotative as it contains objects as well that need to show up to scale.

 

I was able to find the solution, but it was odd.

 

The error I made was that I clicked on "evaluate" in the attribute field which no longer enabled me to alter the formatting for this field (since my new problem was truncating the 0s to two decimal places). I found this out by re-doing the process. You're able to format or adjust your field expression even up until you click "evaluate". 

 

My process:

1. Insert field in attribute default

2. Formula

2.1. "ROUND(((SW_LENGTH/12)*2))/2"

2.2. SW_LENGTH - insert object field, in my case, shearwall length (parameter must have show properties "on")

2.3 /12 - to express the field as decimal foot

3. Press enter

4. Format will appear

4.1. Format as desired

5. Click "ok"

 

**UPDATE: It seems formatting only shows up your first save and without hitting the evaluate button. I revisited the file to see if i can change the format again, but the feature is gone until I recreated the formula by inserting a new field.**

 

1st GIF showing the process above

2nd GIF is final form of my shearwall length indicator block

Recording 2023-09-11 at 10.43.34.gif 

Recording 2023-09-11 at 10.53.07.gif

 

0 Likes