I am trying to create script to set workset for pipes based on their “System Type”. I have created attached script and it’s running fine without any error with attached Revit file but workset is not changing.
Following are the list of Worksets and System Type i like to match.
XS CAD Chilled Water Flow - Hyd_Water
XS CAD Fire Booster - Fire
XS CAD Sanitary Drain - Hyd_Sewer
You need to somehow map the system type to the workset id. Right now you’re setting the workset as the system type (which doesn’t exist and is the wrong type.) I would use a dictionary to map each system type to the appropriate workset id.
Thank you for your help and script is alive using workset id node you suggested.
Now i have one more query that i like to search more items using system type and i have used “String.Contains” node. Here i like to assign list of string to be search in selected items. Any suggestion what is the right node for the same.
One quick follow up, I realize this is an example, but do I have to extract the workset ID and bind in the dictionary definition, or does this let me set what the ID is no matter what is already in revit?