Retrieving all sheets in current revit model

revit
clockwork
dynamo

#1

I found this link , but it uses a deprecated package. Ultimately I would want to create a list that displays as

  • E-101TW - FIRST FLOOR POWER PLAN
  • E-121TW - FIRST FLOOR LIGHTING PLAN
  • E-501TW - DETAILS

I think I will have the use the clockwork package, but not too sure. Any help would be appreciated.


#2

Any reason you don’t want to use OOTB nodes? That link is very old so maybe they were using that method because Dynamo didn’t have the OOTB capability at the time…

This method here is all with OOTB nodes, and the output strings can be joined to produce a list that displays the way you describe


#3

@awilliams gave a great illustration to get the elements. Your link dates back to 2014 (has it been that long?). As @Andreas_Dieckmann mentioned those nodes were replaced by out of the box (OOTB) nodes and as a result you should use those. To get your desired output you can try the following.

  1. Use a List.Transpose node to reorganize the data from the Element.GetParameterValueByName node.
  2. Use a List.FirstItem node and a List.LastItem node to separate the list into separate lists.
  3. Use a String.Join node where the first input is the sheet numbers, the second list is the sheet names, and the separator is a string value of " - ".

If you struggle with replicating @awilliams’ solution or working out the directions above I suggest you visit the Dynamo primer and do every exercise, the ones which are confusing twice. Don’t skip any even if they feel like you don’t need them - the content there is curated to let you know the concepts required to understand how to work through these sort of problems, and that understanding will save you time in the long run.

http://dynamoprimer.com


#4

@JacobSmall I was able to produce the following. However, I am not getting the end result in the format I want. It seems to be treating an entire list as one string. Is this normal?

ex: E-121TW - FIRST FLOOR LIGHTING PLAN


#5

This is how I was able to get around not using string.join. Although I would be interested in seeing if one could get the same result using the string.join node.


#6

You want to use String1 + " - " + String2; in a code block if you’ve separated your lists.

String.Join does exactly what you’ve shown; it concatenates a list with a given separator. It just happens to let you join multiple lists at once. You would use String.Join if you kept the list structure that Amy showed - Sheet Number and Sheet Name in the same sublist.


#7

Try setting lacing to longest and/or enabling levels on the string.join node.