Hello all. I'm a new one in the MicroStation add-in development. As I understood the C++ API has more methods so I chose it.
For now, I have some logic that creates some geometry elements. I am interested in disabling the Undo\Redo history while this element is being created or how to exclude this element from this history. For example, in some cases where I need it. The user creates some geometry. After it, he calls some add-in command which should generate some geometry via API, for example, 50 lines. But he sees that his initial geometry is incorrect, so he wants to undo some changes. And in this case, he should make about 50 undo operations to just cancel the creation of "add-in lines". So I want to avoid this situation. How can I do it? Thanks all for the answers.
Hi Arthur Morgan ,
Located in the MicroStation SDK's Documentation folder are the help files:: MicroStationAPI.chm and DgnPlatformNet.chm.Please refer to the "TransactionManager" related Help Topics; like "Methods"; that provide very flexible methods to interact with the MicroStation Undo/Redo transactions.HTH,Bob
Arthur Morgan said:he should make about 50 undo operations to just cancel the creation of "add-in lines"
MicroStation's state engine works with transactions. Wrap the code that creates 50 lines in a single transaction. Then your user can undo that single transaction that wraps 50 lines. Here's an article about that, complete with comments from Bentley staffer Brien Bastings.
Regards, Jon Summers LA Solutions