events: using openclosetransaction
Hi all,
I want to work with events and also access objects after transaction has ended.
For that I need the openclosetransaction. Can anyone tell me how to use the openclosetransaction? Maybe you have a little example?
Regards
Andreas
Comments
-
@andreas_p
That is a pretty generic description, but then you say you must use openclosetransaction.
You should not be focused on this forum alone for .net. You must use theswamp.org, autodesk forum, and throughtheinterface blog, as well as others. The bcad .net API matches autocad's. I found this with google:
help.autodesk.com/view/ACD/2015/ENU/?guid=GUID-50FD6118-B2D1-4313-A7D6-830794DFDEFA0 -
also, this link is important to understanding openclosetransaction:
https://forums.autodesk.com/t5/net/difference-between-startopenclosetransaction-vs-starttransaction/td-p/7290717I had not heard of it so learned just now what it does.
0 -
You probably do not need to use any transaction within your event handler because while a 'Modified' event is triggered, the object is already opened for write, simply get the object from the 'sender' parameter of the the event handler.
See this similar topic:
https://forums.autodesk.com/t5/net/access-entity-event-after-transaction/m-p/9330736#M649620 -
Thank you!
0