Picking New Element Host via API

Picking New Element Host via API

Anonymous
Not applicable
5,868 Views
9 Replies
Message 1 of 10

Picking New Element Host via API

Anonymous
Not applicable

Hello All,

       Does anyone know how to change an Element's host/work plane through the Revit api. I can't find anything in the Revit API that doesn't require deleting and replacing the element. FamilyInstance contains the properties Host, Host Face, and HostParameter... but they're all getters. 

 

       Thank You!

0 Likes
Accepted solutions (2)
5,869 Views
9 Replies
Replies (9)
Message 2 of 10

jeremytammik
Autodesk
Autodesk
Accepted solution

Dear James,

 

Thank you for your query.

 

Afaik you are perfectly right, and the host element or level or plane can only be set at creation time.

 

Please file a wish list item in the Revit Idea Station for a possibility to set it.

 

There is probably one there already that you can vote for and comment on.

 

Thank you!

 

Best regards,

 

Jeremy

 



Jeremy Tammik
Developer Technical Services
Autodesk Developer Network, ADN Open
The Building Coder

Message 3 of 10

Anonymous
Not applicable

Wow! It's not even accessible through PostableCommand, yet it applies to half of our fixture and tag families. 

Anyways, Thank you Jeremy! It feels like you're the only one supporting questions from the API community... I appreciate it though!

0 Likes
Message 4 of 10

Anonymous
Not applicable
Accepted solution
0 Likes
Message 5 of 10

jeremytammik
Autodesk
Autodesk

Dear James,

 

Thank you very much for your appreciation and wish list entry.

 

Best regards,

 

Jeremy

 



Jeremy Tammik
Developer Technical Services
Autodesk Developer Network, ADN Open
The Building Coder

0 Likes
Message 6 of 10

Anonymous
Not applicable

Ah! Okay, thank you!

0 Likes
Message 7 of 10

jeremytammik
Autodesk
Autodesk

Oops, sorry, it doesn't, I was mixed up.

 



Jeremy Tammik
Developer Technical Services
Autodesk Developer Network, ADN Open
The Building Coder

0 Likes
Message 8 of 10

Anonymous
Not applicable

No problem!

0 Likes
Message 9 of 10

joshua.lumley
Advocate
Advocate

Form class has a Rehost method, is it possible to use this?

0 Likes
Message 10 of 10

jeremytammik
Autodesk
Autodesk

Please try it out and let us know!

 

It sounds like it should do the right thing.

 

However, I am afraid it might not work in all cases. Look at Diane's note from the AU Revit API panel:

 

https://thebuildingcoder.typepad.com/blog/2018/11/dashboard-regen-and-revit-api-panel-at-au.html#2.2

 

  • Rehost a family instance
    • Definitely doesn't work on face based but would like it to work in all cases
    • Also needs to work on links

 

Cheers,

 

Jeremy

 



Jeremy Tammik
Developer Technical Services
Autodesk Developer Network, ADN Open
The Building Coder