dimven / SpringNodes

A collection of Dynamo nodes
MIT License
69 stars 46 forks source link

FamilyInstance.ByHostAndPoint Window not cutting anything (Solved) #56

Closed Koziu233 closed 5 years ago

Koziu233 commented 5 years ago

Hi,

(Sorry for the late reply, and the issue has been closed, so I updated my original question.)

Here is an alternative solution if windows are not cutting the wall when using FamilyInstance.ByHostAndPoint

Theoretically, as @dimven commented in below, to make the windows cutting the wall, the nodes Wall.ByCurveAndHeight (for example) and FamilyInstance.ByHostAndPoint need to be activated in separate transactions. But putting the nodes Transaction.End and Transaction.Start between creating walls and windows never worked.

However, it worked when you put them in between creating windows and refreshing windows. Like in the figure shown below. First creating your windows not cutting the walls, then end the transaction, finally refresh these windows. These could be done by both:

  1. Delete and recreate the windows. Document.DeleteElements
  2. Reset any parameter you like. Element.SetParameterByName

Hope this helps anyone.

03 01 02

dimven commented 5 years ago

Since both the walls and the windows are created in the same transaction, Revit does not have enough time to "finalize the walls" prior to hosting the windows in them. You need to split the two in separate transactions so that the walls can be finalized and the model can regenerate. Try putting a Transaction.End node prior to the FamilyInstance.ByHostAndPoint.