Long time forum lurker here, and genuinely stuck on this graph. Am attempting an automated Room Data Sheet (RDS) - got this far, having started this morning. Generating a number of errors - anyone got any pointers/tips on where I’m going wrong?
Dynamo 2.0.2 & Revit 2019.0.2 : Link to all files here.
Clear any rooms that aren’t placed. There are nulls in the Elevation results. Also make sure your list structures are the same here. It actually looks like the Rooms node and Floor Plan View may be feeding different length lists to the Elevation node. I would flatten them both and see.
Try to rename your rooms and see if that helps.
I think your transactions need some work. I would look at a Wait node from python or a package like Orchid. This may help sequence your steps a little more between the creation of dependent items and really it looks like everything just needs to wait on the Floor plans.
The Set Parameter by name is failing because you haven’t connected the Room number and Room name to the node that combines them with “Isomettic View”.
Thanks very much for getting back to me. Please find attached screenshot and dynamo script. The script was created in Dynamo version 1.3.46666 & Revit version 2019.2.2. As you can see from the screenshot I am having issues with the nulls in the elevation node & creating any RCP’s at all. I am using the standard revit architectural sample project for testing.
See below screenshot. Its similar to the issue above, it is creating elevations but also creating unwated nulls. Apologies I am unable to attach the script, I have sent it to you via Linkedin.
From my testing, it appears there is a lacing issue inside the node that is causing the nulls. When I testing it with the FirstItem node for room and view, it works without an issue. @jean do you have any information?
I am not sure if it is an option, but I would also recommend that you update Dynamo and/or use 2.* version so you can update to the latest Quasar package as well. This may resolve the issue since the v.0.2.0 is several updates old.
Also, if you view the GitHub for the package examples, you can see the video for this shows a single level being supplied and not a list.
Thanks very much for your help sean. I was able to resolve the issue by changing the lacing to longest. Did the ceiling node work for you by any chance? I cannot get that node to work at all.
Not really sure why that node isn’t working, but I have modified the Floor Plan Node by Archilab to create ceiling plans like this in the past in a python node.
# Copyright(c) 2015, Konrad K Sobon
# @arch_laboratory, http://archi-lab.net
import clr
clr.AddReference('ProtoGeometry')
from Autodesk.DesignScript.Geometry import *
# Import Element wrapper extension methods
clr.AddReference("RevitNodes")
import Revit
clr.ImportExtensions(Revit.Elements)
# Import geometry conversion extension methods
clr.ImportExtensions(Revit.GeometryConversion)
# Import DocumentManager and TransactionManager
clr.AddReference("RevitServices")
import RevitServices
from RevitServices.Persistence import DocumentManager
from RevitServices.Transactions import TransactionManager
doc = DocumentManager.Instance.CurrentDBDocument
# Import RevitAPI
clr.AddReference("RevitAPI")
import Autodesk
from Autodesk.Revit.DB import *
import System
from System import Array
from System.Collections.Generic import *
import sys
pyt_path = r'C:\Program Files (x86)\IronPython 2.7\Lib'
sys.path.append(pyt_path)
#The inputs to this node will be stored as a list in the IN variable.
dataEnteringNode = IN
if isinstance(IN[0], list):
rooms = UnwrapElement(IN[0])
else:
rooms = [UnwrapElement(IN[0])]
names = IN[1]
bboxOffset = IN[2]
runMe = IN[3]
def OffsetBBox(bbox, offset):
bboxMinX = bbox.Min.X - offset/304.8
bboxMinY = bbox.Min.Y - offset/304.8
bboxMinZ = bbox.Min.Z - offset/304.8
bboxMaxX = bbox.Max.X + offset/304.8
bboxMaxY = bbox.Max.Y + offset/304.8
bboxMaxZ = bbox.Max.Z + offset/304.8
newBbox = BoundingBoxXYZ()
newBbox.Min = XYZ(bboxMinX, bboxMinY, bboxMinZ)
newBbox.Max = XYZ(bboxMaxX, bboxMaxY, bboxMaxZ)
return newBbox
try:
errorReport = None
if runMe:
viewTypes = FilteredElementCollector(doc).OfClass(ViewFamilyType)
for i in viewTypes:
if i.ViewFamily == ViewFamily.CeilingPlan:
viewTypeId = i.Id
break
else:
continue
existingPlans = FilteredElementCollector(doc).OfClass(View).ToElements()
existingPlanNames, existingPlanElements = [], []
for i in existingPlans:
if not i.IsTemplate:
if i.ViewType == ViewType.FloorPlan:
existingPlanNames.append(i.ToDSType(True).Name)
existingPlanElements.append(i)
# Start Transaction
TransactionManager.Instance.EnsureInTransaction(doc)
floorPlans = []
for i,name in zip(rooms,names):
levelId = i.LevelId
bbox = i.BoundingBox[doc.ActiveView]
newBbox = OffsetBBox(bbox, bboxOffset)
viewName = name
if viewName in existingPlanNames:
view = existingPlanElements[existingPlanNames.index(viewName)]
view.CropBox = newBbox
view.CropBoxActive = True
view.CropBoxVisible = False
floorPlans.append(view)
else:
newView = ViewPlan.Create(doc, viewTypeId, levelId)
newView.ViewName = viewName
newView.CropBox = newBbox
newView.CropBoxActive = True
newView.CropBoxVisible = False
floorPlans.append(newView)
# End Transaction
TransactionManager.Instance.TransactionTaskDone()
else:
errorReport = "Run Me set to False"
except:
# if error accurs anywhere in the process catch it
import traceback
errorReport = traceback.format_exc()
#Assign your output to the OUT variable
if errorReport == None:
OUT = floorPlans
else:
OUT = errorReport
@SeanP, Good day. Yes, you are absolutely right and thanks for pointing out. @chris.millar, the intention of the ViewUtility.ElevationInRoom was to generate the views Level by Level . Currently, Quasar package version 0.2.x are the most stable versions so far …
Ha, well I would agree except I did feed it singles and just got a completely non-descript error message that it couldn’t be completed. I’ll get and post the actual error, but it wasn’t something I had seen before.
Wow, I feel pretty dense that I didn’t notice the Python code on the very page of yours that I linked too! I know I had posted similar code for RCP nearly two years ago, funny how things cycle back through.