Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Canceling Command Problem

Status
Not open for further replies.

kaidetot

Programmer
Jun 9, 2003
4
0
0
PH
I need to limit the erase command on a drawing. Such as the user cannot erase text object with a specific color. Anyone willing to help?
 
You can undefine the erase command and redefine it, but any user with experience can still get around your "fix".

If all you are looking for is to eliminate accidental erasures, this will work, because the user will have to key "_ERASE" instead of "ERASE" or just "E".

You will also have to make sure the .MNS does not use the "_ERASE" command for the buttons or pulldowns.

The routine for undefining and redefining will have to go in the "acad2000doc.lsp" or the "acad2000.lsp" if you have Acad2000, or the appropriate file for 2002 or 2004.

Threatening to shoot employees that erase the wrong thing usually works as well, particularly if you are known as an NRA supporter.
 
Thanks for the help nebster. but i have use lsp. What i did was add a key to an object if i dont want to delete it. And It triggers a undo command in endcommand event in VBA
 
Sneaky. I haven't learned VB yet. Not enough "Round Tuits".
I will remember that if anyone else ever asks about it.
Thank you.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top