I have been following a tutorial from Archi-Lab to create placeholder sheets from Excel in a Revit project. At the point where I use a given python script, the output becomes empty lists. I am unable to find the error. Any guidance out there?
This is rather old. There is a node in archi-lab package called Create Placeholder Sheet. That should be all you need there. I might update that workflow at some point, as its out of data by now. Sorry.
Konrad, thanks for your quick reply. And, please excuse my ignorance. When you say there is an archi-lab package called Create Placeholder Sheet, is this a plug-in I can download? I found this page https://dynamonodes.com/2016/01/27/archi-lab-node-index/ but am unsure what to do with that page.
Thanks, Konrad! Working with the “create placeholder” node, I’m not sure what to do with the “RunIt” input. I’ve searched around but am not finding information on it. As I am not able to generate sheets yet, I wonder if this is the key missing yet?
its a boolean toggle. Please hover over the input of the node to see what argument type it accepts.
Working! Thank you!!
I wonder if I could ask another question. I am trying to modify your script to include more outputs. Shooting in the dark, I’m working on editing the Create Placeholder Sheets node, but the attempted outputs do not appear in the Revit schedule. Attached are a few screenshots. Any advice on what lines I may be missing in the coding?
Like I said this is old. It’s unnecessarily convoluted to do it this way. Please use Element.SetParameterValuebyName to write all these parameter to Sheets after they are created. That way its much easier and clearer for someone else reading your definition.
@Konrad_K_Sobon and all,
Working through this again. Perhaps its from lack of knowledge in dynamo/python at large, but I am not yet understanding how to use Element.SetParameterValuebyName to write parameters to the placeholder sheets after they are created. A screenshot of my attempt is attached. It feels as if I am missing a step.
Conceptually, it makes sense to me to modify the CreatePlaceholder custom node that Konrad made in the archi-net package. But, I do not think I’m modifying it correctly, as additional columns from excel of data do not appear in revit after using my modified node.
My sense is that I am missing lines in the Python script. Perhaps in the “else” statement, more lines are needed to include the new inputs? I haven’t found the correct language to get this to work.
I’m reading “Automate the Boring Stuff” to get a crash course in programming, but any insight is appreciated.
[See below for further screen shots]
Above, current python script for “Create Placeholder Sheet” custom node. Only modifying lines 12-15 here.
Above, Revit sheet schedule, still empty columns for additional info (in this case, looking to see column 3 have data)
I am a little confused as to what you are trying to accomplish here. The original post on my blog was about using data from Excel to create Placeholder sheets and write some parameter values to them. If that’s what you are doing, then you need to do the following:
- Read Excel
- Take sheet numbers and feed into sheet number input of placeholder node.
- Take sheet name and feed into sheet name input of placeholder node.
- Set boolean toggle to true and feed Run it input.
Output of that node are Placeholder sheets already present in Revit document. If you want to set some parameters for them then:
- Take next column of your data in excel and feed that into value input of the SetParameterValueByName node.
- Take list of placeholder sheets that was outputted by CreatePlaceholderSheet node and feed that into Element input of the SetParameterValueByName node.
- Feed a name (string) into the parameterName input of the SetParameterValueByName node.
That will set the parameter for each sheet to whatever corresponding value in Excel was. There is no need to edit any Python code here.
You may also want to take a look at this post.
@Steven_Hansen and @Konrad_K_Sobon Thank you so much! My sheet index is up and running. I sincerely appreciate your help (as does my whole office)!
For anyone who may find it useful, I’m attaching a screenshot of the strategy Konrad supplied.
I’m so glad to be back in the Dynamo arena!
Beautiful, can you put a screenshot of the excel sheet your data is pulled from and your Revit Sheet Schedule after you run the script?
What do you have feeding into the sheet name at the beginning? Is it a code block? Could you share the full script and what your excel file looks like?