UIDoc.SaveAndClose() Close is not allowed when there is any open sub-transation

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hello,
I am trying to open a family and close the old family however I am reciving the message Close is not allowed when there is any open sub-transation, transation or transation group.
My code is something like this:
Dim activeDoc As Document = commandData.Application.ActiveUIDocument.Document
Dim oldUIDoc As UIDocument = commandData.Application.ActiveUIDocument
Dim strNextFile As String = "c:\aa.rfa"
Dim NewUIDoc As UIDocument = commandData.Application.OpenAndActivateDocument(strNextFile)
Try
oldUIDoc.SaveAndClose()
Catch ex As Exception
MsgBox(ex.Message)
End Try
How do I close any open transactions and is OpenAndActivateDocument creating the ofending transation?
Any ideas?
Thanks
David Rock