Dynamo Script to rename design option

adam.purdyA2FPK
Explorer
Explorer

Dynamo Script to rename design option

adam.purdyA2FPK
Explorer
Explorer

Hello, 

I have just figured out how to rename Sheets & Views using a Dynamo Script and now wanting to take this further and be able to rename my Design Options. 

Using the same method I've used for the Views, It doesn't seem to be carrying through into Revit. 

Does anyone know if this is even possible or have a solution they could direct me to. 

Thank you. 

0 Likes
Reply
773 Views
1 Reply
Reply (1)

DavoudMWAWD
Participant
Participant

Hi Adam,

I'm not experienced in Dynamo so not sure if this helps you are not (maybe you can create your own node using this, it is in Python) :

 

from Autodesk.Revit.DB import*

doc = __revit__.ActiveUIDocument.Document # Defining the document

design_option_set_collector = FilteredElementCollector(doc).OfCategory(BuiltInCategory.OST_DesignOptionSets).ToElements()
design_option_collector = FilteredElementCollector(doc).OfClass(DesignOption).ToElements()
t = Transaction(doc, 'Naming')
t.Start()
counter = 0
for d in design_option_set_collector:
d.Name = 'D' + str(counter) # The names should be unique
counter += 1
t.Commit()

 So this way your sets would be renamed D0, D1, D2, ...

You can also do the same thing for primary options and ....

Cheers,

0 Likes