Distance checking with error in RayBounce

Hi all,

my aim is to check the distance between walls with the input value initially. If the distance is over the value (i.e. 1500mm), the result will go green, otherwise red. And i make a file but i know there are so much both latent and patent errors :sweat_smile:.

  1. Is the detection way right? I have use Element.GetParameterValueByName in second part but i don’t know if it is right.
  2. What is the problem existed in the third part with the yellow error in RayBounce node?

Thank you for any helps!

@ luhon15li, share rvt, we’ll try to find out.

Thanks @Vladimir ,

Distance R2.dyn (46.6 KB) Distance testing.rvt (1.5 MB)

The R2 is the dynamo file with the errors :sweat_smile:. And the testing is my revit file that used for checking only so it is very simple. But any helps are so meaningful, thank you!

Done! Look and compare to original.

Distance R2-new.dyn (118.0 KB)

Hi @Vladimir,

thanks for the help! However, i have an error on the nodes that are stating “unresolved”. Is that the version difference that i cannot open the file ? Firstly i am using version 1.2.2 to open, then the pop-up said that “error opening corrupted file”. Then i delete it and download the newest version, the file can be opened but some errors existed in the photo.

Latest version for Revit up to 2019 is https://dyn-builds-data.s3-us-west-2.amazonaws.com/DynamoInstall2.0.3.exe

Hi @Vladimir,

Thanks ! I can upgrade it now and sudcessfully open the file! After i run the program, the line is existed to show the distance. But how about the next node that shown here?

Hello, share your Revit file here.

Hi @Vladimir,

Distance testing Revit.rvt (1.6 MB) Dynamo Checking.dyn (1.1 MB)

The Revit file and the dynamo file is also attached above. Thanks for any help!

There’s strange comparison of Area and Curve length at the beginning.


I am still thinking about the effectiveness and the accuracy of the parameter name at the beginning. But i know i have to input the data of detected wall surface right? Any suggestions to fix this ? Thank you.

Maybe i attach the newest version of dynamo file to you.
Dynamo Checking.dyn (113.7 KB)

What is the final purpose of script? Some practical examples? We’ll think.
Also we can use rooms boundaries. Perpendiculars from Internal loops lines to external.


I have seen a similar sample in the website,

that i want to show the resulted lines with color when they reach the targeted value (now is 1500mm in the beginning) or not. But the sample here is checking for the horizontal distance. I have tried to amend it by myself :sweat_smile:, but still the problem is existed. It is very good if my final result can be this: