Revit API - How to check for open Transactions, Sub-transactions, or Group Transactions
Afaik, the Revit API does not enable you to check from outside whether a transaction is started. You need access to the Transaction object itself to check its status. If you did not create it yourself, you have no access to it.
How did you open the two documents? 
What Revit commands did you execute in them?
I'm working on a button where I have a project document open and a family document open. I'm trying to close the family document however I'm getting an error saying:
Autodesk.Revit.Exceptions.InvalidOperationException: 'Close is not allowed when there is any open sub-transaction, transaction, or transaction group.'
I've checked all of my transactions and they are all started and committed using transactionName.Start(document) and transactionName.Commit()
does anyone know of a way to check for any ongoing active transactions?
I have also tried using
'RevitCommandId closeDoc = RevitCommandId.LookupPostableCommandId(PostableCommand.Close);
uiapp.PostCommand(closeDoc);'
however that tends to only want to close my project document.
///////////////////////////////////UPDATE/////////////////////////////
soooo I just found out I didn't need to use uiapp.OpenAndActivateDocument(). I didn't know you could edit a family without opening the document. That solves my problem. I'm still curious if there's a way to check for open transactions though.