Quantcast
Channel: All Revit API Forum posts
Viewing all articles
Browse latest Browse all 66683

Re: doc.EditFamily() Python

$
0
0

I've found the solution. For other users on this forum:

 

In python my function looks like this: 

 

def FindElementbyName( doc, targetType, targetName ): 

 

        result = None

 

        collector = FilteredElementCollector( doc ) 

        collector.OfClass( targetType ).ToElements()

 

        for f in collector: 

                if f.Name.Equals( targetName ):

                        result = f

 

        return result

 


Viewing all articles
Browse latest Browse all 66683

Trending Articles