I feel like this topic has probably been covered, but I wasn't able to turn up anything by searching.
I want to use an API program/script to rehost orphaned/not-associated face-based family instances (lighting fixtures and air terminals in particular) to a ceiling. The ceiling lives in a linked model. I can work out from the API documentation how to build the selection set of orphaned/not associated instances, and I figure I can locate the ceiling by raycasting from the element I'm trying to rehost--that's the easy part. The hard part appears to be changing the host once I have that information in hand.
I have spent a pretty good chunk of time searching the API reference and I can see how to read the Host, but I have yet to find any way to change the host of an existing FamilyInstance. Is there a way to do this, or is the only way forward to create a new FamilyInstance on the new host, copy the properties over, and move the connections from the old to the new element?
Thanks in advance, everyone!