Hi
Can anyone give any ideas as to why I might be having the following issue.
I have created an application that manages and inserts families.
Depending on user selectable options the application uses several methods to insert families into the model.
Everything appears to work fine but I have noticed that when using "NewFamilyInsert" to insert a family that has not had any previous instances added to the model it doesn't appear to host correctly. I am using NewFamilyInsert so I can move and align families automatically to a ceiling grid. The first instance of the family does show that its hosted to the ceiling in its properties, and it does move with the ceiling when the ceiling height is changed. it doesn't however cut a hole in the ceiling geometry.
I did not notice this behaviour until I added a loop into my code that allows a user to contine adding families until the escape key is pressed. If you add several families and then view in 3D and select the ceiling you can see the first insertion does not have a hole cut around it (see attached screenshot). Subsequent calls to the insert routine then work fine.
I tried duplicating the first insert within the same transaction (re-calculating the insert point to place the duplicate in the adjacent tile), the duplicated family hosted fine, so I then tried deleting the first instance. This resulting in the duplicate then having the host issue.
Other methods of insert or using the Revit UI to add the family does not cause the issue. (however it is not possible to move and align the families to the centre of the tile using these methods without several clicks and keybard input, many of the families also require a central insert point which I can handle within my application)
The only fudge I have not tried is inserting a duplicate in another transaction and then deleting the first 'abnormal' insert. I do however feel that this would be a very dirty method of acheiving what should be a simple insertion.
I have attached a screenshot indicating how the first insertion differs when the ceiling is selected (or if the family visibility is turned off then in the example attached only the two subsequent insertions would be visible by the hole they have cut in the ceiling)
I am so frustrated by this issue that I will personally buy a pint (or several, via paypal transfer) for anyone who can shed light on this issue and help me
solve it.
many thanks
Paul Marsland
Hi Paul,
two things - would you be able to provide any the code that shows the looping function or the instance placement? Might help to see what you're actually doing to know if there's just something missing. Secondly, just to clarify, are you using C#? I'm not sure I've seen it referred to NewFamilyInsert here
Can't find what you're looking for? Ask the community or share your knowledge.