I am having trouble with a script that used to work on Revit 2019.2 (Refinery 0.9.4) but doesn’t on Revit 2020 (Refinery 0.35.0). I am sure the problem is related to the data.remember node since Refinery works fine if what is being calculated doesn’t require anything from Revit. It seems to me that the data.remember node isn’t actually remembering what was selected in Revit neither passing that info to Refinery.
I simplified my original script to prove my point. Here you can find the script and a screenshot from Refinery. As you can see, Refinery works fine calculating “Solid.Volume” which comes from geometry created within Dynamo, while “Area” is not calculated since it comes from geometry extracted from Revit; I tested this same script in Revit 2019.2 and both parameters are calculated.
Dynamo screenshot:
To clarify, the element selected in Revit is a floor, and the geometry extraction section gets one face of that floor and calculates the area. Originally I am doing this with other purpose but I simplified it to prove the point I am making here.
Looms like you are remembering stuff after the calculations are preformed by Sandbox. Always place the Remember node right after the Revit interaction, which in this case is element.geometry.
Alternatively, unsure the input to the Remember node before you run the graph, that way the serialized data persists as nothing is overwriting it.
The version with “only data-remember” worked fine for me, but I did change the ‘solid.volume’ node to not be an output, using a renamed watch node instead (personal best practice):
The version from Revit (original-script) also worked, but I made the same watch node change, and relocated the remember node to be where the other graph had it (for consistency), removed the extra remember node, and reorganized your ‘geometry extraction’ section so the logic flow was more legible (it took some self control to not rework the Point.ByCoordinates bit as well):
I don’t understand what you’re after with the geometry, but the graphs certainly work.
So this is certainly working for me…
If it’s not the ‘Solid.Volume’ as an output, then I recommend you ask on the Refinery beta as there is clearly something else going on here that the development team should be made aware of.
Upgrading to Refinery 0.62.2 solved it! I can finally try it on my actual project , the script I was sharing before was just something random I made up to prove the point that it wasn’t working. Anyways, thank you for your help and advice, much appreciated!