Create Placeholder Sheets using Excel and Shared Parameters

Hi, i am trying to create placeholder sheets using a excel spreadsheet which references both built-in parameters and shared parameters. i am managing to create the lists to extract the data from the spreadsheet but i am struggling to write the information back into Revit.

I have used the PlaceholderSheet.ByNumbersAndName Node and tried to edit the custom node to include additional shared parameters but my limited python scripting is not helping.

The Python Script…

import clr
clr.AddReference(‘RevitAPI’)
from Autodesk.Revit.DB import *

clr.AddReference(“RevitNodes”)
import Revit
clr.ImportExtensions(Revit.Elements)

clr.AddReference(“RevitServices”)
import RevitServices
from RevitServices.Persistence import DocumentManager
from RevitServices.Transactions import TransactionManager

doc = DocumentManager.Instance.CurrentDBDocument
department = IN[0]
sheetnums = IN[1]
sheetnames = IN[2]
elementlist = list()
counter = 0

TransactionManager.Instance.EnsureInTransaction(doc)
for num in sheetnums:
try:
newsheet = ViewSheet.CreatePlaceholder(doc)
newsheet.SheetNumber = num
newsheet.Name = sheetnames[counter]
elementlist.append(newsheet.ToDSType(False))
except:
elementlist.append(None)
counter += 1
TransactionManager.Instance.TransactionTaskDone()
OUT = elementlist

Any help would be appreciated as i need to add another two sheet name line 2 and 3 shared parameters.

@Gary_Mans Could you post some dummy files (dyn, Revit, excel). Thanks

@salvatoredragotta as requested here is the files.

  1. Spreadsheet
  2. Revit Project (2017)
  3. Dynamo Script
  4. Shared Parameter File

Drawing Register.xlsx (8.3 KB)

SheetPlaceholderbyExcel.rvt (2.7 MB)

SheetPlaceholderbyExcel.dyn (110.2 KB)

Revit_Master_Shared_Parameters_v2_5.txt (69.6 KB)

Hi @salvatoredragotta,

With some further investigation and looking at various threads, i managed to create the following script.

It Extracts the columns and data from Excel, creates the placeholder sheets then it filters, sorts and update the shared parameters.

You run will include errors because of NULL VALUES.

Hi have tryed this out but i cant get the “Sheet.CreatePlaceholder” to work, i have tried to download servel versions of Archi-Lab package - but no luck so far

Warning: Node of type ‘Sheet.CreatePlaceholder’ (C:\Users\Gary\AppData\Roaming\Dynamo\Dynamo Revit\1.3\packages\archi-lab.net\bin\Archi-lab_Grimshaw.dll) cannot be resolved

I found this thread while looking into using dynamo to do exactly what you are doing. I’m assuming the front end of your solution screenshot is the same as the first one you posted, but what node did you end up using for the shared parameters? Did you go the route of Python or was it a node in a package?

Thanks

@Gary_Mans
@GavinCrump
Was there ever a post that further explained the Shared Parameters section of this script? I’d like to be able to create placeholder sheets that link back to existing shared parameters, but I’m having a hard time finding a “how to” on this. Ideally, I’d like to be able to use the excel file to create placeholder sheets and update all sheets information for certain fields (i.e. plot sequences & subdiscipline shared parameters that have been created). I’ve watched many tutorials, but they all seem to get me halfway there in different ways.
Any input would be greatly appreciated.
Thanks

Here is an example. Add more columns and set their names to the parameter names, ensuring they are applied as project parameters to sheets before running the script. I’m not sure why the script is creating shared parameters, you are better off making sure your template has all needed parameters already instead.

The two custom nodes are from Crumple.

Generally tutorials can only get you so far. If your workflow becomes more bespoke in nature, you will be less likely to find that part covered.

Make sheets set values.rvt (476 KB)

Make sheets set values.dyn (23.7 KB)

3 Likes