DynamoRevit icon indicating copy to clipboard operation
DynamoRevit copied to clipboard

wrap function opens transaction and doesn't close it

Open AmeerMansourBeca opened this issue 3 years ago • 3 comments

Dynamo version

1.3

Operating system

windows 10

What did you do?

https://forum.dynamobim.com/t/wrapping-revit-elements-to-dynamo-elements/68658/5 I was trying to wrap Revit API elements to dynamo elements using Revit Api add-in.

What did you expect to see?

if a transaction was opened then it should be closed.

What did you see instead?

this appears after wraping elements image image

Error is in RevitNodes.dll namespace : Revit.Elements class :ElementWrapper

AmeerMansourBeca avatar Sep 28 '21 14:09 AmeerMansourBeca

Thank you for submitting the issue to us. We are sorry to see you get stuck with your workflow. While waiting for our team member to respond, please feel free to browse our forum at https://forum.dynamobim.com/ for more Dynamo related information.

github-actions[bot] avatar Sep 28 '21 14:09 github-actions[bot]

Looks like this one is more Revit related and I will transfer this to DynamoRevit repo

QilongTang avatar Sep 28 '21 17:09 QilongTang

Hi @AmeerMansourBeca , are you still experiencing this issue? As the Exception message says, there can only be one transaction at the same time. You may use TransactionManager.Instance.EnsureInTransaction(Document) to ensure your action in a transaction, or ForceCloseTransaction to end the transaction from RevitNodes.

ZiyunShang avatar Dec 22 '21 05:12 ZiyunShang