- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic to the Top
- Bookmark
- Subscribe
- Printer Friendly Page
About Undo/Redo
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
01-03-2012 07:59 AM
Hi, everyone.
Recently, I want to implement Undo/Redo function for my application. I have some problems. I appreciate your help very much.
demo codes as follows:
int depth=0;
api_part_start_state(depth);
API_BEGIN
//many API functions such as:
api_solid_block();
api_transform_entity();
//
。。。。。
API_END
outcome result1 = api_part_note_state(outcome(API_SUCCESS), depth);
if (result1.encountered_errors())
{
error_info* m_error = result.get_error_info();
CString str_error = m_error->error_message();
AfxMessageBox(str_error);
}
When call this function: outcome result1 = api_part_note_state(outcome(API_SUCCESS), depth); the application crashed.
I don't know why!
I want to use the "history" , what should I take notice of?
I just want to implement Undo/Redo function.
Re: About Undo/Redo
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
01-03-2012 10:05 AM
Hello Wally
I would recommend replacing
api_part_note_state(outcome(API_SUCCESS), depth);
with
api_part_note_state(result, depth); // result is declared in the API_BEGIN macro above.
Do you know if you are using the part manager? If you are not using the part manager, you may want to switch to api_note_delta_state.
If you need more detailed help, you might consider making a sample ap to illustrate the problem and submitting an incident to customer support. With a call stack, an ACIS developer could give you a fairly quick diagnosis of why the api is failing: it is probably just a case of doing something simple incorrectly.
Eric
Re: About Undo/Redo
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
02-21-2012 11:33 PM
If i want to implement Undo/Redo using api_note_delta_state,should i use MACRO API_BEGIN and API_END pair everytime i use AICS api to create solid models?

