Problem with family instance in updater.

Problem with family instance in updater.

AndrewButenko
Advocate Advocate
303 Views
2 Replies
Message 1 of 3

Problem with family instance in updater.

AndrewButenko
Advocate
Advocate

I am writing a tool that allows you to cut out some parts of a wall using a family instance and the cut geometry command.
I am also trying to create an updater for changing the wall, in which, in accordance with the change in the wall, my family instance is also rebuilt. However, sometimes in the updater, when the wall has already changed and I haven't rebuilt my family yet, I get the error "Can't cut instance(s) of Family 1 out of its host.".
Does anyone know how to solve this problem?

304 Views
2 Replies
Replies (2)
Message 2 of 3

moturi.magati.george
Autodesk
Autodesk

Hi @AndrewButenko,

 

The issue occurs when Revit cannot regenerate the geometry to display the moved model component.

 

https://knowledge.autodesk.com/support/revit/troubleshooting/caas/CloudHelp/cloudhelp/2021/ENU/Revit...

 

 

  Moturi George,     Developer Advocacy and Support,  ADN Open
Message 3 of 3

jeremy_tammik
Alumni
Alumni

In the updater, you specify its change priority:

  

https://www.revitapidocs.com/2023/9db16841-106b-23bb-0c29-42017edcf69f.htm

  

That defines which other events occur before and afterwards, and where in the sequence your changes are applied.

  

Possibly, your changes are applied to late in the sequence.

  

So, the wall cat is generated before your cutting family instance has been completely updated.

  

Maybe setting a higher change priority will help.

  

Jeremy Tammik Developer Advocacy and Support + The Building Coder + Autodesk Developer Network + ADN Open