Hi
I refer on Forum run branch node based Freeze Node Control.
But seem like need run 2 time (double run) so the firstime run return “null”
How to solve that issue
Thank advance!
# let's see if we can break some stuff
#import standard python libraries
import clr
#reference loaded dynamo revit module
clr.AddReference('DynamoRevitDS')
import Dynamo
#reference dynamo core to update node values
clr.AddReference('DynamoCore')
#access to the current Dynamo instance and workspace
dynamoRevit = Dynamo.Applications.DynamoRevit()
currentWorkspace = dynamoRevit.RevitDynamoModel.CurrentWorkspace
branch1 = None
branch2 = None
#find the branch nodes
for i in currentWorkspace.Nodes:
if i.Name == "1":
branch1 = i
elif i.Name == "2":
branch2 = i
#freeze/unfreeze branch nodes
if IN[0]:
branch1.IsFrozen = False
branch2.IsFrozen = True
out = "Running Branch 1."
else:
branch1.IsFrozen = True
branch2.IsFrozen = False
out = "Running Branch 2."
#return confirmation
OUT = out