Previous post in this series [Part 3]
This post describes the nodes that generate the file names for the exported drawing files. As you may recall from the previous posts in this series, a list of Views and Sheets was generated from a user-created ViewSheetSet in Revit® by a Python Script node. That list was then separated into two lists, one for Views and one for Sheets, to allow for separate naming conventions for the exported drawing files for each. (Specifically, so that the sheet number can be included in the file name for Sheets.) The nodes that do this are contained in three groups: Generate Names for Exported Views, Generate Names for Exported Sheets and Combine Names....
- For Views: dwgname = view.Name + "_Export" + ".dwg";
- For Sheets: dwgname = view.SheetNumber + "_" + view.Name + "_Export" + ".dwg";
The lists of Sheet and View names are then run through two String.Replace nodes. The first replaces any asterisks ("*") with underscores ("_") and the second replaces any forward slashes ("/") with hyphens ("-"), as neither of these characters are permitted in a drawing file name, even though they are allowed in a View or Sheet name in Revit. Each resulting list of file names is then passed through a Watch node, so that the contents can be inspected after the graph is run. These two lists are then sent to the Combine Name... group, where a List.Create node and a Flatten node combine them into a single list. An optional Watch node is included here, as well.
So now we have a combined list of View and Sheet objects (from Part 3) and a combined list of file names for the corresponding exported files. The next post will look at the remaining user input nodes.