Height & Width Parameters not being extracted for Doors?

Dynamo is not recognizing the height or width parameter? There are multiple different door types in the model and we are trying to get all the heights and widths to help us create quick door elevations but due to the difference in types they have different parameters. The only parameters which we can use that are consistent are the “Height” & “Width” parameters yet they do not seem to be picked up by dynamo.

In the future, please try searching for similar questions before posting. This question has been asked and answered many times already.

Width and Height are TypeParameters which means they exist in the FamilyType, not the FamilyInstance. You need to get the FamilyTypes of each door first.

2 Likes

@neil.mackennon , use archilab package Get Type Parameter

1 Like

Hi Draxl_Andreas

I tried that already but the value comes back null.
I have looked at lots of other examples of people having similar issues but height always seems to appear yet it does not seems to be working for me

Thanks

this is a test model i am using to try and get the script to work

1 Like

image

1 Like

@neil.mackennon , @Nick_Boyts

I slowly understand this lenguage that noone can speak :slight_smile:

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

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


doc = DocumentManager.Instance.CurrentDBDocument

def familyInstance(x,list):
	if isinstance(x,list):
		return x
	else:
		return [x]

elements = UnwrapElement(IN[0])
vals = []

for i in familyInstance(elements,list):
    # Get ElementId of ElementType
    tipo_id = elements.GetTypeId()
    # Get actual Element from Document
    tipo = doc.GetElement(tipo_id)
    if tipo:
        i = tipo.LookupParameter(IN[1])
        if i:
            param = i.AsDouble()
            metricvals = UnitUtils.ConvertFromInternalUnits(param,UnitTypeId.Meters)
            vals.append(metricvals)
    else:
        vals.append()

OUT = vals

1 Like

Thank you!

@neil.mackennon , if it works you can mark it as solution… … so noone will ask anymore about calling typeparameters :wink:

Hello…i would just do as >Nick mention…with ootb

1 Like

For the next week at least…

2 Likes

Thanks everyone, and I’ve seen I have annoyed some people with my question sorry. I then had to try to make it work with linked files doors but with a couple of packages and your advice I got it working. so thank you!

2 Likes

2 Likes