I have been trying to get the layer thickness for each material in my project but whatever I try I seem to get the wrong numbers. I’ve tried the WallType.Width function of dynamo for my walls and the Get CompoundStructureLayers from GeniusLoci but it doesn’t work. Any ideas what is wrong or how I can solve this issue?
Thank’s for your reply! Unfortunately the package does not work for some reason, although I believe the problem must come form something else. If I use the same script as you did I receive the following as outcome:
(The numbers of the wall thickness above btw are incorrect too)
import clr
import sys
import System
clr.AddReference('RevitAPI')
from Autodesk.Revit.DB import *
from Autodesk.Revit.DB.Structure import *
clr.AddReference('RevitAPIUI')
from Autodesk.Revit.UI import *
clr.AddReference('System')
from System.Collections.Generic import List
clr.AddReference('RevitNodes')
import Revit
clr.ImportExtensions(Revit.GeometryConversion)
clr.ImportExtensions(Revit.Elements)
clr.AddReference('RevitServices')
import RevitServices
from RevitServices.Persistence import DocumentManager
from RevitServices.Transactions import TransactionManager
doc = DocumentManager.Instance.CurrentDBDocument
uidoc=DocumentManager.Instance.CurrentUIApplication.ActiveUIDocument
#Preparing input from dynamo to revit
walls = UnwrapElement(IN[0])
vals = []
for i in walls:
vals.append(i.Width)
OUT = vals
I guess sometimes there’s no way around
Thank you so much! I’ve used your scrip in a new file (architecture/meters) now with the Basic Wall: generic - 200mm and was able to receive the same result as you did. However I ask myself how I get from the 0.6561… to the 200 mm? I guess I would have to remap those numbers or am I wrong?
import clr
import sys
import System
clr.AddReference('RevitAPI')
from Autodesk.Revit.DB import *
from Autodesk.Revit.DB.Structure import *
clr.AddReference('RevitAPIUI')
from Autodesk.Revit.UI import *
clr.AddReference('System')
from System.Collections.Generic import List
clr.AddReference('RevitNodes')
import Revit
clr.ImportExtensions(Revit.GeometryConversion)
clr.ImportExtensions(Revit.Elements)
clr.AddReference('RevitServices')
import RevitServices
from RevitServices.Persistence import DocumentManager
from RevitServices.Transactions import TransactionManager
doc = DocumentManager.Instance.CurrentDBDocument
uidoc=DocumentManager.Instance.CurrentUIApplication.ActiveUIDocument
#Preparing input from dynamo to revit
walls = UnwrapElement(IN[0])
vals = []
output = []
for i in walls:
vals.append(i.Width)
for w in vals:
output.append(UnitUtils.Convert(w, UnitTypeId.Feet, UnitTypeId.Millimeters))
OUT = output