Python Name Generator Script

New to Python coding and trying to create my first script. I may be over reaching with Python but am not sure. I do have all this working in Dynamo but I hope creating something in Python would help with script speed.

End goal is to select my assemblies inside of Revit. It takes those names and creates 3 overall schedules per unique numbering per our numbering system. I have got the script splitting and removing characters then returning the unique strings. What I would like to do is create the names, schedule views, templates and filters. If someone with more python coding experience thinks I am over reaching please let me know.

This is currently where I am at with creating the names. Currently trying to figure out how to get this into 1 Python script.

Here is where I am getting hung up.

You’re really close. Right now you have your duplicate and unique item lists being created inside the loop for each element, meaning they get overridden for each item. You want them created outside the loop so that you add to them every iteration.

1 Like