Welcome to the Forum!
have a look at this.
Family instances : the family you would like to change the type of [quote=“Muzaffars2015, post:1, topic:10757”]
Window-1
[/quote]
The node FamilyInstance.SetType is from ClockWork package
Family Type : the new family