Author Topic: how to control delete operation  (Read 3389 times)

0 Members and 1 Guest are viewing this topic.

subbup

  • Guest
how to control delete operation
« on: June 22, 2004, 01:17:21 AM »
Hello all,

I don't want allow delete operation in a drawing.
Can any one tell me how to do this

MP

  • Seagull
  • Posts: 17750
  • Have thousands of dwgs to process? Contact me.
how to control delete operation
« Reply #1 on: June 22, 2004, 09:55:51 AM »
(1) Cut off CAD Operator's hands
(2) Outlaw use of Delete.
(3) Make drawing(s) read-only.
(4) Put drawing(s) in read-only directory.
(5) Use 3rd party tool like CadLock.
(6) Reactor the set-up to death,  see (1).
Engineering Technologist • CAD Automation Practitioner
Automation ▸ Design ▸ Drafting ▸ Document Control ▸ Client
cadanalyst@gmail.comhttp://cadanalyst.slack.comhttp://linkedin.com/in/cadanalyst

JohnK

  • Administrator
  • Seagull
  • Posts: 10646
how to control delete operation
« Reply #2 on: June 22, 2004, 10:06:37 AM »
Here is a small demonstration for using Reactors to react to a command. Setting up a application to react to all the delete commands would be kinda indepth but you can if you want.
Code: [Select]
(vl-load-reactors)
(vlr-command-reactor nil '((:vlr-CommandWillStart . StartCommand)))
(defun StartCommand (calling-reactor startcommandinfo / thecommandstart)
  (setq thecommandstart (nth 0 startcommandInfo))
  (cond
    ((= thecommandstart "LINE")
     (theswamp)
     )
    ((= thecommandstart "SAVE")
     (vlr-remove-all :vlr-command-reactor)
     )
    ((= thecommandstart "QSAVE")
     (vlr-remove-all :vlr-command-reactor)
     )
    )
  )
(defun theswamp ()
  (alert "Please wait unitll direct you to TheSwamp...")
  (startapp "explorer" "http://www.theswamp.org/phpBB2/")
  (alert "You may now continue with your line.
         To cancle this reactor use the save command.")
 (princ)
)
TheSwamp.org (serving the CAD community since 2003)
Member location map - Add yourself

Donate to TheSwamp.org

SMadsen

  • Guest
how to control delete operation
« Reply #3 on: June 22, 2004, 10:28:43 AM »
Just 2 cents. You might as well just use a viewer if the question really says what I think it says.
A vast amount of simple operations are depending on deletion of entities. A simple mirror command would be terribly restrained without deletion. As would working with blocks, texts, dimensions etc. etc.

JohnK

  • Administrator
  • Seagull
  • Posts: 10646
how to control delete operation
« Reply #4 on: June 22, 2004, 10:36:43 AM »
Oooh good point Stig.
TheSwamp.org (serving the CAD community since 2003)
Member location map - Add yourself

Donate to TheSwamp.org

subbup

  • Guest
how to control delete operation
« Reply #5 on: June 23, 2004, 02:45:10 AM »
what exactly i want to do is whenever USER STARTS a DELETE command or hitting delete key in keyboard, the operation should be cancelled.
I think we can handle this with reactors.
Thank you Se7en.

daron

  • Guest
how to control delete operation
« Reply #6 on: June 23, 2004, 08:30:15 AM »
but you might take Stig's concern to heart. Reactors might, as he says not allow a mirror command to work if you don't want to leave the original objects in the drawing. If you don't have a strong understanding of how things happen in autocad, like what it takes to perform a mirror, you surely don't want to start messing with reactors. Also, if you don't have a sound understanding of lisp, you don't want to start off with reactors. If, on the other hand, you do have a sound understanding of these things, then have fun.

JohnK

  • Administrator
  • Seagull
  • Posts: 10646
how to control delete operation
« Reply #7 on: June 23, 2004, 10:38:20 AM »
I agree with Stig on this one. It would be a whole lot easier to go get a viewer.

***
As i re-read your post, you say that you want to disable in a drawing[/b] ...if you mean that litterly, your getting into persistant reactors. (I wouldnt mess with those.)
TheSwamp.org (serving the CAD community since 2003)
Member location map - Add yourself

Donate to TheSwamp.org

SpeedCAD

  • Guest
Re: how to control delete operation
« Reply #8 on: June 25, 2004, 10:14:23 PM »
Quote from: subbup
Hello all,

I don't want allow delete operation in a drawing.
Can any one tell me how to do this


Hi...

Loook all post here:
http://www.hispacad.com/foro/viewtopic.php?t=3688&postdays=0&postorder=asc&start=30