Announcements
Welcome to the Revit Ideas Board! Before posting, please read the helpful tips here. Thank you for your Ideas!
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Picking New Element Host via API

Picking New Element Host via API

Although a UI-accessible command known as "Pick New Work Plane" exists, it is not accessible through the API as an Element Method, Document Method, or even as a PostableCommand. Not accessible through API!Not accessible through API!

For years, we have dealt with the general BIM issue of re-hosting when the architect deletes, moves, or replaces certain walls/faces within their model. I recently attempted to find a solution to automatically rehost elements, but this is only possible by deleting and re-creating the elements. However, it's not even that simple, because our elements are usually attached to an MEP power system. In addition, these elements are often tagged several times on multiple different views. From there, the problem only gets worse, because the tags are hosted to the element (suffering from the same problem as the elements themselves), and must also be re-created instead of simply picking a new host. Finally, this tag re-creation is entirely impossible for the keynote tags.

So, as of now, the addin is:

  1. Averaging about 5 deletions and re-creations per every 1 element that's rehosted, when it should ideally only call 1 method or change 1 property. 
  2. Forcing the users to handle re-hosting through the UI if the element has a keynote tag hosted to it.Only Getters... not SettersOnly Getters... not Setters

     

22 Comments
joshua.lumley
Advocate

I'm having this exact same problem and it is distressing that we can't rehost entities via the api. I do not believe it would that that difficult to achieve codally. 

Anonymous
Not applicable

@joshua.lumley  100% Agree.... it should be fairly easy for the dev team.

joshua.lumley
Advocate

Revit API doesn't allow you to rehost family instances on a different surface, which is distressing to me because this is what my whole discipline (electrical) is about.

20190729.jpg  <-- what is desperately needed is the code form of this button. 

 

Kind regards, Joshua.

sgermanoZ2Y2F
Enthusiast

We have zero hosted elements as a MEP firm due to various issues like this that could not be solved programatically. Its easier and safer to rebuild your library as non hosted, using workplane based you can achieve the same user experience and eliminate all the headaches of hosted elements with Links. 2 cents...

Anonymous
Not applicable

@sgermanoZ2Y2F Agreed! We have done that... however, some of the efficiency penalties/heartache we get from using level-hosted elements (like a loss of wall-snap functionality) is pretty annoying. Just hoping ADSK would allow us to take our own approach. Thanks for the suggestion though!

joshua.lumley
Advocate

I'm posing this on Sunday morning (1am). Now looking at creating a ridiculous workaround where the family is hosted on a surface in a adaptive generic family, to make a kind of sandwich so that the family can be maneuvered by the API.  The surface is 0 thickness and hidden behind the family. 

It isn't right not being able to rehost via API ... and bizarre.  It's like a wedding where the bride doesn't show up and everybody is too polite to mention it.

Anonymous
Not applicable

Adding my vote for this!

tamas.deri
Advocate

@sgermanoZ2Y2F you are right about the headacehs related to hosted elements, but work-plane based objects cannot be rehosted either via API (i mean changing the work-plane)

Anonymous
Not applicable

I need that option very,very much. without it trying to code for LVL system in Revit is usefuul.

joshua.lumley
Advocate

It is bizarre that it wasn't there on day 1 of the API and I expect Revit 2022 to be released still without support for rehosting family instances.  In fact I came close to quitting Revit API programming for this single reason. 

edgars_miskins
Advocate

I'm furious.
I wrote a 200+ lines of code for my plugin, that had a re-hosting planned as the final step only to find out, that it's not supported in the API....
wtf, Autodesk... we pay you exorbitant amounts of money and this is still not implemented?

joshua.lumley
Advocate

I feel you, the only way it gets in the API is if a major AutoDesk client screams for it. It would take them half a day to write the code. Not being able to rehost has effected my career...I'm not being dramatic it's just a fact. 

 

"I Have No Mouth, and I Must Scream"

edgars_miskins
Advocate

Or, alternatively, the code solution behind, the "Edit Work Plane" button is so contrived, horrible and patched-up, that they would have to re-write bunch of other stuff to make it available in the API as an elegant method.

bweinreder
Enthusiast

That's very unfortunate. I'll assume that there's no Dynamo way either?

joshua.lumley
Advocate

Dynamo is just a skin on the API.

edgars_miskins
Advocate

In the end I wrote a workaround for my specific needs. I cannot afford to wait until Autodesk decides to do something about this.

Workaround:

  • Create a new instance on the desired workplane
  • Copy all the needed parameter values
  • Delete the old instance
  • If needed, update any linking information for the object replaced
Balaji_07
Advocate

It has been 4 years!! Do we have any update on this API changes?

jeanmarc.couffin
Advocate

gathering freakin' support, right...

W_Whit
Enthusiast

I just ran into this issue. Classic basic issue for Autodesk and nothing but letting threads like this gather dust. 

m.onopko
Explorer

I'm also currently dealing with the need to rehost doors to new walls. Please implement the feature, thanks.

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

Submit Idea  

Autodesk Design & Make Report