Help with a simple script

Hi all,

I’m trying to create a very simple script that takes three parameters from Revit, adds them together and pushes them back into another parameter.
I’m managing to strip the 3 parameters from Revit, add them together, push back in, but some of them are wrong. I can’t work out why most are correct, but a few do not add up correctly.

I’m a new user so can’t upload anything it seems. Any other way for me to share the file?

Hello Mike,
Correct me if I´m wrong, but I think you should be able to show a screen capture with your script.

Screenshot should work and will likely give us enough info to help you out. Also you can try Dropbox or other upload site and post a link. Would need a sample Revit file with a smaller version of your dataset too (unlikely we will have the same parameters set up in a mode to test).

Thanks for the replies,

It’s a strange one. The example I worked on to create the script seems to work fine, but back in the main project it seems to not work correctly for some pipes:

Main model:

I can post the example model that does work however I can’t share the main model which doesn’t. If anyone can spot what might be causing it or suggest alternatives to my gammy script, it would be appreciated.

Also I want to round the results up to the nearest factor of 10. I’ve found a couple of nodes that round to ceiling with a factor, but can’t get it working just yet - they’re expecting a double whereas my list is integers which might not be helping.

Any help appreciated

Example model:


Sorry I missed this, does this add the two parameters together and push the result back into the comments? What is the “list join” node doing? Could I just a third list to the script?

Maybe I’ll just start again doing it this way, see if it fixes the issue.