i am facing the issue that i want nodes to rerun always. I am developing a connection between dynamo an a third party FEM software. Therefore, i export the geometry and create in a second step load for my structur. When i change my geometry using a slider all nodes connected will rerun but my nodes for my loads are doing nothing. Is there a way to force a node to always run?
Since you are running in revit add the below code into a python node without any inputs or outputs.
Then rename the nodes you want to reload with “*Force” at the front of them(without the quotes), see video of how to use it from roughly 1 minute 50 seconds on wards.
# Original Code by John Peirson
# https://forum.dynamobim.com/t/force-run-python/31709/2
# Code has been updated/modified by Brendan Cassidy(@brencass86)
# The Creator of DynaStandard
import clr
clr.AddReference('ProtoGeometry')
from Autodesk.DesignScript.Geometry import *
clr.AddReference('DynamoRevitDS')
import Dynamo
#access to the current Dynamo instance and workspace
dynamoRevit = Dynamo.Applications.DynamoRevit()
currentWorkspace = dynamoRevit.RevitDynamoModel.CurrentWorkspace
def onEvaluationcompleted(obj, e):
for i in currentWorkspace.Nodes:
if i.Name.StartsWith("*Force"):
i.MarkNodeAsModified(True)
#the handlers for when a script has been run
currentWorkspace.EvaluationCompleted += onEvaluationcompleted
#output
OUT = "Done"
Thank you so much! I’ve been search for such asolution for a while. I tested your solition in Zero-touch node and it worked perfectly. I’ll link your solution to other related topics. Thanks again!