Autodesk.Revit.Exceptions.InvalidOperationException:
Starting a new transaction is not permitted.
It could be because another transaction already started and has not been completed yet,
or the document is in a state in which it cannot start a new transaction
(e.g. during failure handling or a read-only mode,which could be either permanent or temporary).
这个错误提示是:
一个事务还没有结束,不可以启动另外一个新事务。
解决的方法是:
用子事务SubTransaction。
即你打算在事务内部重新启动一个事务,就要用SubTransaction
SubTransaction ts = new SubTransaction(uiDoc.Document);
