@jacob.small @jacob.small there appears to be a BUG in Revit Dynamo Python R22 V 2.7. In trying to use the functions to get GenericAnnotations then sort:
def Lambda_GenAnno_Sort(lstObj):
convert = lambda text: int(text) if text.isdigit() else text.lower()
alphanum_key = lambda i: [ convert(c) for c in re.split('(\d+)', i) ]
##GenAnnoTypeName##https://forum.dynamobim.com/t/python-script-to-get-type-name-from-an-element/63306/2
GAstrName = lambda j: [ alphanum_key(c) for c in doc.GetElement(j.Id).get_Parameter(BuiltInParameter.ALL_MODEL_TYPE_NAME).AsString()]
return sorted(lstObj, key = GAstrName)
“Name” is inaccessible for Generic Annotation family types…
I was able to work around the issue:
GAstrName = lambda j: [ alphanum_key(c) for c in doc.GetElement(j.Id).get_Parameter(BuiltInParameter.ALL_MODEL_TYPE_NAME).AsString()]
Is the non-existent GenAnnoType.Name a bug? If so where do I report it?