Dynamo - Script for dimensions

Dynamo - Script for dimensions

jc.methot
Participant Participant
9,926 Views
18 Replies
Message 1 of 19

Dynamo - Script for dimensions

jc.methot
Participant
Participant

I want to add a text in the "below" dimensions text of multiple dimensions I was wondering if any of you have a script for this.

0 Likes
Accepted solutions (1)
9,927 Views
18 Replies
Replies (18)
Message 2 of 19

L.Maas
Mentor
Mentor
Accepted solution

Hereunder the basic nodes to do this

 

Dynamo Dimension.JPG

 

Louis

EESignature

Please mention Revit version, especially when uploading Revit files.

Message 3 of 19

jc.methot
Participant
Participant

thank you!

0 Likes
Message 4 of 19

arch.khaled.94
Contributor
Contributor

Please I need to add the text for certain value of a dimension line such as gaps.how i can do that? 

0 Likes
Message 5 of 19

L.Maas
Mentor
Mentor

If it is a new question, better to start a new thread.

 

I am not sure what you want. Can you better explain what you need?

Maybe some examples, screenshots etc?

Louis

EESignature

Please mention Revit version, especially when uploading Revit files.

Message 6 of 19

arch.khaled.94
Contributor
Contributor

Screenshot_20220507_175033.jpg

 how to add (p) text just to 3/4" values? And how to add two different text to the 3/4" and the others (walls)? 

0 Likes
Message 7 of 19

L.Maas
Mentor
Mentor

Is something like this what you want?

LMaas_0-1651965398550.png

 

Louis

EESignature

Please mention Revit version, especially when uploading Revit files.

Message 8 of 19

arch.khaled.94
Contributor
Contributor

not exactly, this screen shot maybe more clear of what I need to explain >> the 3/4''  take text PJ  & the walls take text PD how to do that in dynamo ? (exactly the same of dimension in the screenshot)

 

Thanks in advance.

archkhaled94_0-1652020982693.png

 

0 Likes
Message 9 of 19

L.Maas
Mentor
Mentor

Concept stays largely the same

 

LMaas_0-1652053659107.png

In this case the Dimensions.SetBelowValue is from the Rhythm package.

The core node SetBelowValue will set all the below text to the same value.

Of course you will have to modify the script for your own purpose.

Here I have only a single dimension. You will have to decide how to handle other dimensions you have in the view (include/exclude).

 

 

Louis

EESignature

Please mention Revit version, especially when uploading Revit files.

Message 10 of 19

arch.khaled.94
Contributor
Contributor
Thank you so much.
0 Likes
Message 11 of 19

arch.khaled.94
Contributor
Contributor

Please, can you share this script?

Or send it to me please

Arch.khaled.94@gmail.com

 

Thank you 

0 Likes
Message 12 of 19

arch.khaled.94
Contributor
Contributor

please how to filter the dimension type to select just one type?

 

I have tried this process but it doesn't work.

 

 

 

11.PNG

 

 

 

 

0 Likes
Message 13 of 19

mhiserZFHXS
Advisor
Advisor

What does the error say?

0 Likes
Message 14 of 19

L.Maas
Mentor
Mentor

Always check what the warning says. Even that a node is yellow does not mean that it does not work at all. It means that it does not work in some (or all) instances. The warning might give an idea of the issue at hand.

 

First Issue. What I see in your script is that in the top you filter out elements (with the filterbyboolmask). However in the bottom row you do not do this. That is probably the first cause of the warning in this case.

In the top row you remove dimensions that are not of type "panel". You should remove the corresponding list of values from the bottom row.

 

Second Issue. Look carefully at my script. In your case you extract some data from the dimension (i.e. name)

In your last node "Setbelowvalue" what do you feed in?....the name. However what that node needs is not a text/string but a dimension. This information is at the "All elements of category" node (indicated by ID in green highlight). So the filterbyboolmask should be applied on that node and then feed in the setbelowvalue. (You want apply the changes on the dimension element, not on the name of that dimension).

 

With nodes always check what kind of information the inputs needs (e.g. elements, string, integers, numbers).

Louis

EESignature

Please mention Revit version, especially when uploading Revit files.

0 Likes
Message 15 of 19

arch.khaled.94
Contributor
Contributor

thank you all, I have resolved it.

the error was in this feed.

archkhaled94_0-1654095628423.png

 

 

 

 

 

0 Likes
Message 16 of 19

alejandroCH79K
Enthusiast
Enthusiast

Hi mate, @L.Maas 

I was checking this script, and I think I am almost there. Can you have a look? In my case I want to add the text "GAP" to the set below value only to the dimension is 16, I hope you can have a look

 

Cheers

 

alejandroCH79K_0-1716518489367.png

 

alejandroCH79K_1-1716518559433.png

 

 

 

 

0 Likes
Message 17 of 19

L.Maas
Mentor
Mentor

Check what your nodes are doing

Here I show what basically happens in your node. You do not get the value out you want (only true or false).

Thereunder the code block rewritten and thereunder  a solution with regular nodes

LMaas_0-1716531308138.png

 

Louis

EESignature

Please mention Revit version, especially when uploading Revit files.

0 Likes
Message 18 of 19

alejandroCH79K
Enthusiast
Enthusiast

Great, thanks for your help mate, big one

0 Likes
Message 19 of 19

yash_bhandariESQS5
Community Visitor
Community Visitor

How did you resolve that issue, could you share a screenshot

I have used the same code but getting "Dereferencing pointer" error

0 Likes