ObjectARX
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Prevent undo operation when undo more than one entity ?

1 REPLY 1
Reply
Message 1 of 2
vinhtrancs06
272 Views, 1 Reply

Prevent undo operation when undo more than one entity ?

When use undo ,we can undo one or many operation at the same time .But i need to prevent undo that relate to many operation .

See command :

Command: _.undo

Current settings: Auto = On, Control = All, Combine = Yes, Layer = YesEnter the number of operations to undo or [Auto/Control/BEgin/End/Mark/Back] <1>: 1

 

One operation is undone .

 

but when see other command :

Command: _.undo

Current settings: Auto = On, Control = All, Combine = Yes, Layer = YesEnter the number of operations to undo or [Auto/Control/BEgin/End/Mark/Back] <1>: 2

 

Two operations are undone.

 

I need to prevent that command from executing .

I found the solution use documentLockModeChanged to lock command ,but when i type or press Undo ,it lock .I only want to lock undo if it relate to 2 operations .How can i do it ?Below is code example

 

void MyDocManagerReactor::documentLockModeChanged(AcApDocument * param2, AcAp::DocLockMode myPreviousMode, AcAp::DocLockMode myCurrentMode, AcAp::DocLockMode currentMode, const ACHAR * pGlobalCmdName)

{if(pGlobalCmdName[0] != L'#' && IsFilteredCommand(pGlobalCmdName)

){       

Acad::ErrorStatus es=veto();

}AcApDocManagerReactor::documentLockModeChanged (param2, myPreviousMode, myCurrentMode, currentMode, pGlobalCmdName) ;

}

 

 

1 REPLY 1
Message 2 of 2
fenton.webb
in reply to: vinhtrancs06

Can you explain why you need to do that please?

 

Thanks
Fenton Webb

Autodesk Developer Network




Fenton Webb
AutoCAD Engineering
Autodesk

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report

”Boost