Clockwork SetCompoundLayerWidth not working with Revit 2022

Hi,

After updating to Revit 2022 the Clockwork Node “FamilyType.SetCompoundLayerWidth” does not change the Layer Width anymore. Is there any known alternative to set the CompoundLayerWidth of walls or slabs with Dynamo?

My guess is this is the units API change. Open up the custom node, copy the contents into the graph, paste into the workspace, and wire in the needed inputs.

Once that runs post back the warning message so we can confirm.

Hi Jacob,

Thanks for your quick reply.

Yes there is en error thrown in the Subnode “UnitType.DisplayUnitType”

ILF_2022-03-14 13_20_52-Dynamo

Python Script:

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

clr.AddReference("RevitServices")
import RevitServices
from RevitServices.Persistence import DocumentManager

dynunittype = IN[0]

if str(dynunittype.GetType()) == "Autodesk.Revit.DB.UnitType":
	unittype = dynunittype
elif str(dynunittype) == 'DynamoUnits.Area':
	unittype = UnitType.UT_Area
elif str(dynunittype) == 'DynamoUnits.Length':
	unittype = UnitType.UT_Length
elif str(dynunittype) == 'DynamoUnits.Volume':
	unittype = UnitType.UT_Volume
else:
	unittype = None

doc = DocumentManager.Instance.CurrentDBDocument
formatoptions = doc.GetUnits().GetFormatOptions(unittype)
dispunits = formatoptions.DisplayUnits
symtype = formatoptions.UnitSymbol
if symtype == UnitSymbolType.UST_NONE:
	dispsym = None
else:
	dispsym = LabelUtils.GetLabelFor(symtype)
OUT = (dispunits,dispsym)

Yeah - this is a fairly large lift of Python. The class needed is here: ForgeTypeId Class

Did the Easy solution and Hardcoded it for Input and Revit-Display-Unit in meters, although it would be better to have the units be dynamically recognised by Dynamo…

1 Like

Dynamo can do this, but clockwork needs some updates to do so. I’m not sure when the next planned release for that is.