Wall finish by dynamo to revit does not syncronize

Hello! :wave: (I am using Revit 2022 and latest version of Dynamo)

I am a beginner at Dynamo. I tried to follow on YouTube an easy tutorial on how to add interior wall finishing. (Wall Finish By Dynamo and Revit - YouTube)

I followed it step by step

  1. Creating parameters (interior rendering type and height of it)
  2. Adding rooms and desired materials + height
  3. Creating script as shown in the YouTube video

BUT changes do not appear in my Revit model, unfortunately.

Do you know how could I solve such a problem? ( I strongly believe that I spelled everything correctly in the script).

Also, here is an additional image with the parameters created. (I was not able to add multiple pictures in the first post). :slight_smile:

Hello,

did you check that during running the script that anything is selected or running a comment?

KR

Andreas

Hi @dace.grikite and welcome, most probably the custom node contains a python script within that needs to be modified as per the Revit API changes from 2020 to 2021 and above, try to check if there is an update of that package and make sure you installed/ downloaded the latest one

@dace.grikite these are the modifications that need to be done for the script to work, again, try to check if you installed the latest version of the Modelical package, otherwise, you can use the modified python script:

for j in joinedCurves:
	valueWith = UnwrapElement(wTypes[count]).get_Parameter(BuiltInParameter.WALL_ATTR_WIDTH_PARAM).AsDouble()
	#value = UnitUtils.Convert(valueWith, DisplayUnitType.DUT_DECIMAL_FEET, docLengthUnit)............DisplayUnitType is obsolete in Revit API 2022
	value = UnitUtils.Convert(valueWith, UnitTypeId.Feet, docLengthUnit)
	if UnwrapElement(repeatedRooms[count]).IsPointInRoom(j.Offset(value*0.5,False).StartPoint.ToXyz()) == True:
		offsetedCurves.append(j.Offset(value*0.5,False))
	else:
		offsetedCurves.append(j.Offset(value*-0.5,False))
	count +=1

explodedCurves = []
for oc in offsetedCurves:
	explodedCurves.append(oc.Explode())

#Create walls on top of the curves with fixed height
wHeightsList = [] #List of height for each wall
distances = [] #distance to move a probe point to check the paralel wall
walls = []
TransactionManager.Instance.EnsureInTransaction(doc)
count = 0
for group in explodedCurves:
	for crv in group:
		if vecSimilarity(crv.TangentAtParameter(0),crv.TangentAtParameter(1)):
			rbldCrv = Autodesk.DesignScript.Geometry.Line.ByStartPointEndPoint(crv.StartPoint, crv.EndPoint)
		else:
			rbldCrv = Autodesk.DesignScript.Geometry.Arc.ByThreePoints(crv.PointAtParameter(0), crv.PointAtParameter(0.5), crv.PointAtParameter(1))
		w = Wall.Create(doc, rbldCrv.ToRevitType(), UnwrapElement(wTypes[count]).Id, UnwrapElement(levels[count]).Id, 5, 0, True, False);
		wHeightsList.append(wHeights[count])
		walls.append(w.ToDSType(False))
	count +=1
TransactionManager.Instance.TransactionTaskDone()

#Change the height of the walls to meet requirements, change Location line to Finish Face Exterior and turn off Room Bounding
TransactionManager.Instance.EnsureInTransaction(doc)
count = 0
for w in walls:
	uh = UnwrapElement(w).get_Parameter(BuiltInParameter.WALL_USER_HEIGHT_PARAM) #Unconnected height
	ll = UnwrapElement(w).get_Parameter(BuiltInParameter.WALL_KEY_REF_PARAM) #Location line
	rb = UnwrapElement(w).get_Parameter(BuiltInParameter.WALL_ATTR_ROOM_BOUNDING) #Room bounding
	#uh.Set(UnitUtils.Convert(wHeightsList[count], docLengthUnit, DisplayUnitType.DUT_DECIMAL_FEET))............DisplayUnitType is obsolete in Revit API 2022
	uh.Set(UnitUtils.Convert(wHeightsList[count], docLengthUnit, UnitTypeId.Feet))

Wall Finishes By Room.dyn (13.1 KB)

Hello Tradie,

I tried your script but I still have issue in Revit 2022. It seems that the version of Python (Python 2) is older that the one used by Dynamo (Python 3). Can it affect the script? If yes, how can we fix it?