Combine family instances without using NewFamilyInstances with face

Combine family instances without using NewFamilyInstances with face

an_vuong.nguyen
Contributor Contributor
406 Views
4 Replies
Message 1 of 5

Combine family instances without using NewFamilyInstances with face

an_vuong.nguyen
Contributor
Contributor

Hi everyone,

I was trying to combine two family instances together without using NewFamilyInstace with face. After combining i can move both of them once on plance. I have tried to use Host. Unfortunately we cannot set Host in revit api. Does anyone have solution for my problem?


Thank you all very much

 

Cheers

An Vuong

0 Likes
Accepted solutions (1)
407 Views
4 Replies
Replies (4)
Message 2 of 5

jeremy_tammik
Alumni
Alumni

Please explain two things: (i) what does "move both of them once on plance" mean? (ii) what are the exact detailed steps that you use to move them via the end user interface? If you can achieve the desired result in the UI, there is a good chance it can be done programmatically as well. If not, not.

   

Jeremy Tammik Developer Advocacy and Support + The Building Coder + Autodesk Developer Network + ADN Open
0 Likes
Message 3 of 5

an_vuong.nguyen
Contributor
Contributor
Hi Jeremy,

Thank you for your reply.
- "move both of them once on plance" means if i move first instance, the second instance has to be moved as well.

-Detailed steps: After i combined instances, i click on the first instance and drag it somewhere else on plane 3. In meantime the second was moved follow the first one.

I hope that my explaining is understandable. Please let me know

Best regards

An Vuong
0 Likes
Message 4 of 5

s04049
Enthusiast
Enthusiast
Accepted solution

you can try to use Dynamic Model Update using IUpdater interface,

by using the Element.GetChangeTypeGeometry to trigger the event.

get the elements on data.GetModifiedElementIds().

and setup the element location relation you want and move accordingly.

 

https://adndevblog.typepad.com/aec/2016/02/revitapi-how-to-use-dmu-dynamic-model-update-api.html

 

0 Likes
Message 5 of 5

an_vuong.nguyen
Contributor
Contributor
Hi,
Thank you for your solution. It worked find for me (y)

Best regards

An Vuong
0 Likes