Brian Ekins

October 2009

Sun Mon Tue Wed Thu Fri Sat
        1 2 3
4 5 6 7 8 9 10
11 12 13 14 15 16 17
18 19 20 21 22 23 24
25 26 27 28 29 30 31

« Accessing Assembly Components | Main | Running Commands Using the API »

March 12, 2009

TrackBack

TrackBack URL for this entry:
http://www.typepad.com/services/trackback/6a00e553fcbfc6883401127964e52628a4

Listed below are links to weblogs that reference Combining Multiple Actions into a Single Undo:

Comments

Daniele

Interesting article. Using transaction you also have to consider the huge amount of memory Inventor consumes. Using single steps (no transaction) Inventor releases the memory at every step. With transaction the memory will be released just at the end. This might lead to potential crashes.

Brian Ekins

This will cause a bit more memory to be consumed but no more than you would expect if you adjusted the number of undo steps available. To illustrate let's assume that the undo stack will allow up to 10 undo operations. When working interactively that means the memory consumed will be up to 10 individual actions. By using the API it is still 10 actions but those actions can wrap multiple sub-actions. For example, you might write a macro that uses transactions and creates 100 lines. Internally there were 100 transactions but they're grouped into a single transaction for undo. Those 100 transactions will used whatever memory is needed to support undo. When they drop off the undo stack that memory will be recovered.

I think it's a small price to pay to be able to undo the placement of the 100 lines whereas without the transaction ability the user would have only been able to undo 10 of the 100, in this example.

Verify your Comment

Previewing your Comment

This is only a preview. Your comment has not yet been posted.

Working...
Your comment could not be posted. Error type:
Your comment has been posted. Post another comment

The letters and numbers you entered did not match the image. Please try again.

As a final step before posting your comment, enter the letters and numbers you see in the image below. This prevents automated programs from posting comments.

Having trouble reading this image? View an alternate.

Working...

Post a comment

RSS Feed

Search