Is there no way to change the host and work plan of a family using the Revit API 2017, without having to re-insert it?
All I find is to re-insert with NewFamilyInstance. And then I would have to copy all the parameters of the old family into the new family and then delete the old one.
It seems strange to me that nobody has a solution for this. Someone can help me, I'm desperate. I have tried everything and it seems like a dead end.
Thank you very much.
Using the API do the same as the Edit Workplane utility does:
- Switch to a new host
- Placing an instance on a new face
Solved! Go to Solution.
Solved by JimJia. Go to Solution.
Dear AlbertoTorres,
Please accept our sincerer apology for the delay! We had a backlog in the queue.
I am sorry to say that there is currently no API access to this functionality.
But maybe you can do it in this workaround like you said,
1. Get the FamilySymbol from your existed instance.
2. Call PromptForFamilyInstancePlacement(Autodesk.Revit.DB.FamilySymbol familySymbol, PromptForFamilyInstancePlacementOptions options) method to put the instance in where you want.
3. Then set the new instance properties.
4. Delete the old one.
Hi JimJia,
I think PromptForFamilyInstancePlacement is not even a workaround since it requires user interaction.
What if we need to re-host hundreds of FamilyInstances...?
Revitalizer
Is there nothing in the Revit API to copy these properties?
Do you want to create a function for it?
Is this a topic that is being prepared for future versions of Revit?
** There are still black holes in the Revit API that have not yet been fixed, like this, rotate elements, etc ...
I am sorry to say there isn't such APIs can do that currently.