Revit API Forum
Welcome to Autodesk’s Revit API Forums. Share your knowledge, ask questions, and explore popular Revit API topics.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Re-host a face based FamilyInstance in a Revit 2013 project via the API

3 REPLIES 3
Reply
Message 1 of 4
souletech
820 Views, 3 Replies

Re-host a face based FamilyInstance in a Revit 2013 project via the API

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!

3 REPLIES 3
Message 2 of 4
souletech
in reply to: souletech

Bump.  Can this be done from the API in Revit 2013?  Can it be done at all?

Message 3 of 4
psmith
in reply to: souletech

I'm still in the process of researching this myself, but I think you'll probably have to either recreate the item itself and replace on the host you've found from Raycasting. My current issue is doing this when the host you want is in a linked model but I'm hearing that this can be done based on new items in the 2014/5 API.
Message 4 of 4

Is there any hope of achieving this in Revit 2021 or Revit 2022 API?

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk DevCon in Munich May 28-29th


Rail Community