Export List of Worksets and Revit / AutoCAD Links to Excel

archi-lab
excel

#1

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.


#2


#3

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


#4

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

http://dynamoprimer.com


#5

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


#6

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


#7

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


#8

I started by dissecting nodes from clockwork and archilab.


#9

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!


#10

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


#11

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