Export List of Worksets and Revit / AutoCAD Links to Excel

I have not yet found a node or a python script example that allows me to export a list of worksets or Revit / AutoCAD links to Excel for model management purposes.

Does anyone know if this already exists?

If not, I am not sure how to find the syntax for workset (for example) that I could call to using a custom python node…

Just starting to learn about the custom python nodes and how to create these.

1 Like

Cool - thanks! I didn’t know about that package.

If you are getting started, here are some great links.

http://dynamoprimer.com

Thank you! where do you suggest I start for Custom Python nodes?

Hi,
Bakery package has a nodes that has informations on link files.

1 Like

Thanks! I also haven’t tried that yet :smiley:

I started by dissecting nodes from clockwork and archilab.

1 Like

Below are some links for learning python.

https://docs.python.org/

And also Stack Overflow is a good place to ask python related queries.

Good Luck!

1 Like

Hi there! Is anybody else noticing an issue with this ‘classic’ node Get Worksets in Dynamo 1.2.0?
I am getting an unrecoverable error… Clockworks package is offering a way to grab Worksets, but these are worksets by element, rather than file worksets.

.

Thanks!

p.s.
There seems to be an node with ‘Bakery’ but it conflicts with Lunchbox, Clockworks, Rhythm packages

I like Python- posthign this here for future reference- PY to get worksets in Revit - tweaked to add pairs of name + ID in output.

import clr

# Import DocumentManager and TransactionManager
clr.AddReference("RevitServices")
import RevitServices
from RevitServices.Persistence import DocumentManager


# Import RevitAPI
clr.AddReference("RevitAPI")
from Autodesk.Revit.DB import *

doc = DocumentManager.Instance.CurrentDBDocument
existWorksets = list()

##Get list of worksets filtered b user worksets only
fwc = FilteredWorksetCollector(doc).OfKind(WorksetKind.UserWorkset)


for ws in fwc:						##For each of the worksets:
	Pair=list()						#Container for list pair of name + ID
	Pair.append(ws.Name)			#Append Name
	Pair.append(ws.Id)				#Add ID
	existWorksets.append(Pair)	#Add pair to output

OUT = existWorksets
3 Likes