Hello all,
This is probably a really dumb question but here it goes…
I am making a script to print multiple sheets with different sizes at the same time.
Is there a node to get the sheet that belongs to the view?
To specify:
I used a filter by boolmask because this is the only way i know how but the bool is always true in my case so i doubt its needed…
To clarify, i need to get the output of the boolmask from the A0++ object without those nodes in between.
the other way around would be getting placed views from a sheet. try the following first, then you just find if a view is in the collection of placed views of a sheet.
test = []
for sheet in FilteredElementCollector(doc).OfClass(ViewSheet).WhereElementIsNotElementType():
temp = [ sheet.Name, [doc.GetElement(v_id).Name for v_id in sheet.GetAllPlacedViews()] ]
test.append(temp)
OUT = test
try this, replace everything in the Python Node with the following.
import clr
clr.AddReference('RevitAPI')
from Autodesk.Revit.DB import *
clr.AddReference('RevitServices')
import RevitServices
from RevitServices.Persistence import DocumentManager
from RevitServices.Transactions import TransactionManager
doc = DocumentManager.Instance.CurrentDBDocument
uidoc = DocumentManager.Instance.CurrentUIApplication.ActiveUIDocument
sel = uidoc.Selection
test = []
for sheet in FilteredElementCollector(doc).OfClass(ViewSheet).WhereElementIsNotElementType():
temp = [ sheet.Name, [doc.GetElement(v_id).Name for v_id in sheet.GetAllPlacedViews()] ]
test.append(temp)
OUT = test
But i dont think the output is correct.
Below i circled the output i need, which are the actual sheets and from your script the output is sheet name.
Could this be achieved by changing sheet.name to sheet in your script?
Also, the output gives me all the sheet names available, and i need only the sheets that correspond with the sizes you see on the left part of the screen
import clr
clr.AddReference('RevitAPI')
from Autodesk.Revit.DB import *
clr.AddReference('RevitServices')
import RevitServices
from RevitServices.Persistence import DocumentManager
from RevitServices.Transactions import TransactionManager
clr.AddReference('RevitNodes')
import Revit
clr.ImportExtensions(Revit.GeometryConversion)
clr.ImportExtensions(Revit.Elements)
doc = DocumentManager.Instance.CurrentDBDocument
uidoc = DocumentManager.Instance.CurrentUIApplication.ActiveUIDocument
sel = uidoc.Selection
test = []
for sheet in UnwrapElement(IN[0]):
temp = [ sheet.Name, [doc.GetElement(v_id).Name for v_id in sheet.GetAllPlacedViews()] ]
test.append(temp)
OUT = test
"EDIT; I feel like i am just missing a node that matches the familyinstance with the sheets corresponding with it… Cant dynamo find the sheet that belongs to this family instance
Its a custom node made to filter sheet width parameter.
The input is all sheets with a height corresponding with an A0 sheet, and filters it further based on the sheet width so the output only sends A0++ in this case.
(The screenshot shows A2 because this node is used for all paper sizes)
I was able to get the correct output when i used a bool filter that matched a string with a titleblock name like below:
The problem is that i cant use titleblock names for filtering since they are different depending on the client
Im making a script to print all sheets in a selected viewset to pdf.
Since all our clients use different titleblock names i have to filter on sheet width and height, expecially since a lot of them also use sheet sizes which arent standard.
The next step in the sheet is matching the filtered sheets to a print setting, but i need the actual sheet for this
When i double click the ID in the output of the sheet width filter, Revit opens the corresponding sheet so i am not sure why i cant just make Dynamo tell me what sheet it is…