I have created a simple dynamo script that allows the user to select a chain of lines in Revit and it calculates the length and places a text node with the length of the chain. I use python script from SteamNodes Tool.GetRevitSelection to get the selected lines from Revit, and then it’s pretty straight forward to add the lengths and place a text node with the value. I also added an integer slider at the front end to “refresh” the script so I could make a new selection and run the script again without having to close dynamo and open the script again.
Running the script works as expected the first time. I see text with the length of the path. But when I select the second path,refresh the script by clicking the integer slider, the script runs and gives the new length, but the previously selected path is deleted. If I close dynamo and reopen between selecting the paths, there isn’t an issue. Anyone have any ideas as to how I can prevent the deletion of the previous selection?