Modifying placed families causes 'serious error'

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I'm writing an application which reads text XYZ coordinates and generates a Revit model.
The application works perfectly; levels, floors, walls, doors, rooms, etc. are created/placed.
However, when I try to move something (a door, a wall) I get "a serious error has ocurred..."
When I undo up to the door placement transaction (meaning that now I only have levels and walls) I can now easily modify the walls that were automatically placed.
It seems that there is something about the door placement that I perceive as being 'over-constrained', which does not allow modification.
Am I on the right track? What should be my next steps to ensure that once doors are automatically placed, they can be easily modified by the user?
The following is a snippet of the door placement transaction, in case it helps.
t.SetName("Place Doors"); t.Start(); for (int i = 0; i < m_Walls.Count; i++) { //Note that each DoorPts object holds extra information, not just XYZ points. (See DoorPts class) doorGeo.DoorPlacementPts(application, m_Walls[i], i); foreach (DoorPts thesePts in doorGeo.DoorXYZ) { if (thesePts.wallHost == i && thesePts.isHosted == true) { FamilyInstance instance = doc.Create.NewFamilyInstance(thesePts.Pt_Place, SelectedOptions.SelectedDoor, m_Walls[i], thesePts.Arc_Level, StructuralType.NonStructural); if (thesePts.isflippedFacing == true) instance.flipFacing(); if (thesePts.isflippedHand == true) instance.flipHand(); } else continue; } } t.Commit();