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: 

Is there no way to change the host and work plan of a family using the Revit API

4 REPLIES 4
SOLVED
Reply
Message 1 of 5
AlbertoTorres
1753 Views, 4 Replies

Is there no way to change the host and work plan of a family using the Revit API

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

 

 

 

Edit_Work_Plane (Pick a new host).pngEdit_Work_Plane (Pick a new face).png

 

 

 

 

4 REPLIES 4
Message 2 of 5
JimJia
in reply to: AlbertoTorres

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.

 

 


Jim Jia
Autodesk Forge Evangelist
https://forge.autodesk.com
Developer Technical Services
Autodesk Developer Network
Email: Jim.Jia@autodesk.com
Message 3 of 5
Revitalizer
in reply to: JimJia

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




Rudolf Honke
Software Developer
Mensch und Maschine





Message 4 of 5
AlbertoTorres
in reply to: JimJia

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 ...

Message 5 of 5
JimJia
in reply to: AlbertoTorres

I am sorry to say there isn't such APIs can do that currently.

 


Jim Jia
Autodesk Forge Evangelist
https://forge.autodesk.com
Developer Technical Services
Autodesk Developer Network
Email: Jim.Jia@autodesk.com

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