Revit Architecture Forum
Welcome to Autodesk’s Revit Architecture Forums. Share your knowledge, ask questions, and explore popular Revit Architecture topics.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Dynamo - Script for dimensions

18 REPLIES 18
SOLVED
Reply
Message 1 of 19
jc.methot
6473 Views, 18 Replies

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

Dynamo - Script for dimensions

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.

18 REPLIES 18
Message 2 of 19
L.Maas
in reply to: jc.methot

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.

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
in reply to: L.Maas

jc.methot
Participant
Participant

thank you!

0 Likes

thank you!

Message 4 of 19
arch.khaled.94
in reply to: L.Maas

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

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

Message 5 of 19
L.Maas
in reply to: arch.khaled.94

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.

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
in reply to: L.Maas

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

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)? 

Message 7 of 19
L.Maas
in reply to: arch.khaled.94

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.

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
in reply to: jc.methot

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

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

 

Message 9 of 19
L.Maas
in reply to: arch.khaled.94

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.

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
in reply to: L.Maas

arch.khaled.94
Contributor
Contributor
Thank you so much.
0 Likes

Thank you so much.
Message 11 of 19
arch.khaled.94
in reply to: L.Maas

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

Please, can you share this script?

Or send it to me please

Arch.khaled.94@gmail.com

 

Thank you 

Message 12 of 19
arch.khaled.94
in reply to: L.Maas

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

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

 

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

 

 

 

11.PNG

 

 

 

 

Message 13 of 19

mhiserZFHXS
Advisor
Advisor

What does the error say?

0 Likes

What does the error say?

Message 14 of 19
L.Maas
in reply to: arch.khaled.94

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

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.

Message 15 of 19
arch.khaled.94
in reply to: jc.methot

arch.khaled.94
Contributor
Contributor

thank you all, I have resolved it.

the error was in this feed.

archkhaled94_0-1654095628423.png

 

 

 

 

 

0 Likes

thank you all, I have resolved it.

the error was in this feed.

archkhaled94_0-1654095628423.png

 

 

 

 

 

Message 16 of 19
alejandroCH79K
in reply to: L.Maas

alejandroCH79K
Contributor
Contributor

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

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

 

 

 

 

Message 17 of 19
L.Maas
in reply to: alejandroCH79K

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

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.

Message 18 of 19
alejandroCH79K
in reply to: L.Maas

alejandroCH79K
Contributor
Contributor

Great, thanks for your help mate, big one

0 Likes

Great, thanks for your help mate, big one

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

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

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

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report