Obtaining Predefined DWG Export Options

Hi all,

I’m trying to return a list of predefined export options (and names) to use in a graph. So far I’ve been successful in returning the names of all available options. However, I’m hitting a road block when it comes to getting the full list of the Revit.DB system objects as the GetPredefinedOptions() takes a string as the second argument. Is there a way to have it run through a list of all available name strings and return the system object for each?

Any direction is greatly appreciated!

You need to iterate through each name:

options = DWGExportOptions()
names = options.GetPredefinedSetupNames(doc)
predef = []
for name in names:
		predef.append(options.GetPredefinedOptions(doc, name))
2 Likes

Thank you so much!
I’ve been trying the loop through ‘options’, which was kicking back every time.
Seeing this makes it much more clear on how it works.

Not in front of a computer right now, but I’m pretty sure that those elements are available in the Element Types dropdown menu node and could thus be collected using All Elements of Type node.

2 Likes

Nice find, @Andreas_Dieckmann.
image

@Andreas_Dieckmann Much easier that way, thank you!