How to force nodes to rerun without changes / When nodes rerun?

Hey hey

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?

greetings
masymo

Do any of your nodes have no input into them in a similar way to the following and how are you running dynamo? eg from within revit or civils 3d?

These are my node which i need to rerun and i run dynamo within revit.

grafik

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.

Video of it in action from 1 minute 50 seconds : https://knowledge.autodesk.com/support/civil-3d/learn-explore/caas/screencast/Main/Details/23d7d023-37ac-479f-827b-0d054bec838e.html

Note: This Code Will Only Work In Dynamo For Revit

# 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"
6 Likes

thank you very much @Brendan_Cassidy

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!