Hardcoding Workset Node

Hello is there a way where you can hardcode workset dropdown node?
image

everytime I open Dynamo or Run the script, my dropdown node changes into something weird and I don’t want to deal with that.

I had a similar problem with Categories so I turned it into Categories.ByName(“XXX”) in code block.

Is there a same way for Workset dropdown?
I tried this in Archilab way but I dont want to rely on custom package nodes for this one.

Thanks!

@mrkpkimEMSRM In case if you can rely on Python then try this:

import clr
clr.AddReference('RevitAPI','RevitServices')
from Autodesk.Revit.DB import *
from RevitServices.Persistence import DocumentManager
doc = DocumentManager.Instance.CurrentDBDocument
OUT = [int(i.Id.ToString()) for i in FilteredWorksetCollector(doc).OfKind(WorksetKind.UserWorkset) if i.Name == IN[0]][0]

@mrkpkimEMSRM, please try to refrain from starting multiple threads with similar questions. It makes things much easier when users can search the forum and find what they need in one place rather than spread out across multiple threads.

Also, please try not to ask for people to do work for you. Most of us are happy to help you out, but we’d rather teach you how to do it yourself over just doing it for you.

1 Like

Looks like you’re using a mis-matched Dynamo/Archi-lab/Revit combo as well (hence the double workset outputs in your screenshot). You should take a few to fix that environment so these issues are not occuring before proceeding much further - it may resolve your issue.